- Home /
Solved
Shader source code in Logcat on Android then Crashes the newly build apk
The device that i am using is Samsung Galaxy S7. On the emulator it's working perfectly well. Anyone who has an idea what's going on and why a shader code is appearing on my logcat. It's a bit long
version 100
1-09 14:05:28.971 32390-32509/? D/Unity: #ifndef SHADER_TARGET 01-09 14:05:28.971 32390-32509/? D/Unity: #define SHADER_TARGET 30 01-09 14:05:28.971 32390-32509/? D/Unity: #endif 01-09 14:05:28.971 32390-32509/? D/Unity: #ifndef UNITY_NO_DXT5nm 01-09 14:05:28.971 32390-32509/? D/Unity: #define UNITY_NO_DXT5nm 1 01-09 14:05:28.971 32390-32509/? D/Unity: #endif 01-09 14:05:28.971 32390-32509/? D/Unity: #ifndef UNITY_NO_RGBM 01-09 14:05:28.971 32390-32509/? D/Unity: #define UNITY_NO_RGBM 1 01-09 14:05:28.971 32390-32509/? D/Unity: #endif 01-09 14:05:28.971 32390-32509/? D/Unity: #ifndef UNITY_ENABLE_REFLECTION_BUFFERS 01-09 14:05:28.971 32390-32509/? D/Unity: #define UNITY_ENABLE_REFLECTION_BUFFERS 1 01-09 14:05:28.971 32390-32509/? D/Unity: #endif 01-09 14:05:28.971 32390-32509/? D/Unity: #ifndef UNITY_FRAMEBUFFER_FETCH_AVAILABLE 01-09 14:05:28.971 32390-32509/? D/Unity: #define UNITY_FRAMEBUFFER_FETCH_AVAILABLE 1 01-09 14:05:28.971 32390-32509/? D/Unity: #endif 01-09 14:05:28.971 32390-32509/? D/Unity: #ifndef UNITY_NO_SCREENSPACE_SHADOWS 01-09 14:05:28.971 32390-32509/? D/Unity: #define UNITY_NO_SCREENSPACE_SHADOWS 1 01-09 14:05:28.971 32390-32509/? D/Unity: #endif 01-09 14:05:28.972 32390-32509/? D/Unity: #ifndef UNITY_PBS_USE_BRDF2 01-09 14:05:28.972 32390-32509/? D/Unity: #define UNITY_PBS_USE_BRDF2 1 01-09 14:05:28.972 32390-32509/? D/Unity: #endif 01-09 14:05:28.972 32390-32509/? D/Unity: #ifndef SHADER_API_MOBILE 01-09 14:05:28.972 32390-32509/? D/Unity: #define SHADER_API_MOBILE 1 01-09 14:05:28.972 32390-32509/? D/Unity: #endif 01-09 14:05:28.972 32390-32509/? D/Unity: #ifndef UNITY_HARDWARE_TIER2 01-09 14:05:28.972 32390-32509/? D/Unity: #define UNITY_HARDWARE_TIER2 1 01-09 14:05:28.972 32390-32509/? D/Unity: #endif 01-09 14:05:28.972 32390-32509/? D/Unity: #ifndef UNITY_COLORSPACE_GAMMA 01-09 14:05:28.972 32390-32509/? D/Unity: #define UNITY_COLORSPACE_GAMMA 1 01-09 14:05:28.972 32390-32509/? D/Unity: #endif 01-09 14:05:28.972 32390-32509/? D/Unity: #ifndef UNITY_VERSION 01-09 14:05:28.972 32390-32509/? D/Unity: #define UNITY_VERSION 561 01-09 14:05:28.972 32390-32509/? D/Unity: #endif 01-09 14:05:28.972 32390-32509/? D/Unity: #ifndef SHADER_STAGE_VERTEX 01-09 14:05:28.972 32390-32509/? D/Unity: #define SHADER_STAGE_VERTEX 1 01-09 14:05:28.972 32390-32509/? D/Unity: #endif 01-09 14:05:28.972 32390-32509/? D/Unity: #ifndef SHADER_API_GLES 01-09 14:05:28.972 32390-32509/? D/Unity: #define SHADER_API_GLES 1 01-09 14:05:28.972 32390-32509/? D/Unity: #endif 01-09 14:05:28.972 32390-32509/? D/Unity: #define gl_Vertex _glesVertex 01-09 14:05:28.972 32390-32509/? D/Unity: attribute vec4 _glesVertex; 01-09 14:05:28.972 32390-32509/? D/Unity: #define gl_MultiTexCoord0 _glesMultiTexCoord0 01-09 14:05:28.972 32390-32509/? D/Unity: attribute vec4 _glesMultiTexCoord0; 01-09 14:05:28.972 32390-32509/? D/Unity: #line 440 01-09 14:05:28.972 32390-32509/? D/Unity: struct v2f_vertex_lit { 01-09 14:05:28.972 32390-32509/? D/Unity: highp vec2 uv; 01-09 14:05:28.972 32390-32509/? D/Unity: lowp vec4 diff; 01-09 14:05:28.972 32390-32509/? D/Unity: lowp vec4 spec; 01-09 14:05:28.972 32390-32509/? D/Unity: }; 01-09 14:05:28.972 32390-32509/? D/Unity: #line 728 01-09 14:05:28.972 32390-32509/? D/Unity: struct v2f_img { 01-09 14:05:28.972 32390-32509/? D/Unity: highp vec4 pos; 01-09 14:05:28.972 32390-32509/? D/Unity: mediump vec2 uv; 01-09 14:05:28.973 32390-32509/? D/Unity: }; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 722 01-09 14:05:28.973 32390-32509/? D/Unity: struct appdata_img { 01-09 14:05:28.973 32390-32509/? D/Unity: highp vec4 vertex; 01-09 14:05:28.973 32390-32509/? D/Unity: mediump vec2 texcoord; 01-09 14:05:28.973 32390-32509/? D/Unity: }; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 20 01-09 14:05:28.973 32390-32509/? D/Unity: struct v2f { 01-09 14:05:28.973 32390-32509/? D/Unity: highp vec4 pos; 01-09 14:05:28.973 32390-32509/? D/Unity: mediump vec2 uv; 01-09 14:05:28.973 32390-32509/? D/Unity: }; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 45 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec4 _Time; 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec4 _SinTime; 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec4 _CosTime; 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec4 unity_DeltaTime; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 51 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec3 _WorldSpaceCameraPos; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 58 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec4 _ProjectionParams; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 64 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec4 _ScreenParams; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 76 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec4 _ZBufferParams; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 82 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec4 unity_OrthoParams; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 87 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp vec4 unity_CameraWorldClipPlanes[6]; 01-09 14:05:28.973 32390-32509/? D/Unity: #line 93 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp mat4 unity_CameraProjection; 01-09 14:05:28.973 32390-32509/? D/Unity: uniform highp mat4 unity_CameraInvProjection; 01-09 14:05:28.974 32390-32509/? D/Unity: uniform highp mat4 unity_WorldToCamera; 01-09 14:05:28.974 32390-32509/? D/Unity: uniform highp mat4 unity_CameraToWorld; 01-09 14:05:28.974 32390-32509/? D/Unity: #line 109 01-09 14:05:28.974 32390-32509/? D/Unity: uniform highp vec4 _WorldSpaceLightPos0; 01-09 14:05:28.974 32390-32509/? D/Unity: uniform highp vec4 _LightPositionRange; 01-09 14:05:28.974 32390-32509/? D/Unity: #line 114 01-09 14:05:28.974 32390-32509/? D/Unity: uniform highp vec4 unity_4LightPosX0; 01-09 14:05:28.974 32390-32509/? D/Unity: uniform highp vec4 unity_4LightPosY0; 01-09 14:05:28.974 32390-32509/? D/Unity: uniform highp vec4 unity_4LightPosZ0; 01-09 14:05:28.974 32390-32509/? D/Unity: uniform mediump vec4 unity_4LightAtten0; 01-09 14:05:28.974 32390-32509/? D/Unity: #line 119 01-09 14:05:28.974 32390-32509/? D/Unity: uniform mediump vec4 unity_LightColor[8]; 01-09 14:05:28.974 32390-32509/? D/Unity: uniform highp vec4 unity_LightPosition[8]; 01-09 14:05:28.974 32390-32509/? D/Unity: #line 127 01-09 14:05:28.974 32390-32509/? D/Unity: uniform mediump vec4 unity_LightAtten[8]; 01-09 14:05:28.974 32390-32509/? D/Unity: uniform highp vec4 unity_SpotDirection[8]; 01-09 14:05:28.974 32390-32509/? D/Unity: #line 131 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec4 unity_SHAr; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec4 unity_SHAg; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec4 unity_SHAb; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec4 unity_SHBr; 01-09 14:05:28.976 32390-32509/? D/Unity: #line 135 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec4 unity_SHBg; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec4 unity_SHBb; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec4 unity_SHC; 01-09 14:05:28.976 32390-32509/? D/Unity: #line 140 01-09 14:05:28.976 32390-32509/? D/Unity: uniform lowp vec4 unity_OcclusionMaskSelector; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform lowp vec4 unity_ProbesOcclusion; 01-09 14:05:28.976 32390-32509/? D/Unity: #line 145 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec3 unity_LightColor0; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec3 unity_LightColor1; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec3 unity_LightColor2; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec3 unity_LightColor3; 01-09 14:05:28.976 32390-32509/? D/Unity: #line 152 01-09 14:05:28.976 32390-32509/? D/Unity: uniform highp vec4 unity_ShadowSplitSpheres[4]; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform highp vec4 unity_ShadowSplitSqRadii; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform highp vec4 unity_LightShadowBias; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform highp vec4 _LightSplitsNear; 01-09 14:05:28.976 32390-32509/? D/Unity: #line 156 01-09 14:05:28.976 32390-32509/? D/Unity: uniform highp vec4 _LightSplitsFar; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform highp mat4 unity_WorldToShadow[4]; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform mediump vec4 _LightShadowData; 01-09 14:05:28.976 32390-32509/? D/Unity: uniform highp vec4 unity_ShadowFadeCenterAndType; 01-09 14:05:28.977 32390-32509/? D/Unity: #line 165 01-09 14:05:28.977 32390-32509/? D/Unity: uniform highp mat4 unity_ObjectToWorld; 01-09 14:05:28.977 32390-32509/? D/Unity: uniform highp mat4 unity_WorldToObject; 01-09 14:05:28.977 32390-32509/? D/Unity: uniform highp vec4 unity_LODFade; 01-09 14:05:28.977 32390-32509/? D/Unity: uniform highp vec4 unity_WorldTransformParams; 01-09 14:05:28.977 32390-32509/? D/Unity: #line 206 01-09 14:05:28.977 32390-32509/? D/Unity: uniform highp mat4 glstate_matrix_transpose_modelview0; 01-09 14:05:28.977 32390-32509/? D/Unity: #line 214
Then my app crashes after that error. My build setting is
opengles2 and openglcore . I know you will tell me to get rid of the openglcore , I did it already but still the same . The shader code in the logcat is showing. Does anyone have an idea what going on here.
Answer by Ginxx009 · Jan 09, 2018 at 08:29 AM
So instead of using opengles2 i tried editing my code and use opengles3 instead and now it perfectly runs on my device.