Hi, I’m testing custom blur with the official example below:
It works fine in editor. However, when I build it on Anroid platform, it causes the below error even though I didn’t use the function’SampleBias’.
The line “MyBlur.hlsl(28)” only includes “SAMPLE_TEXTURE2D”.
'SampleBias': no matching 3 parameter intrinsic method; Possible intrinsic methods are: Texture2DArray<float4>.SampleBias(SamplerState, float3|half3|min10float3|min16float3, float1|half1|min10float1|min16float1) Texture2DArray<float4>.SampleBias(SamplerState, float3|half3|min10float3|min16float3, float1|half1|min10float1|min16float1, int2) Texture2DArray<float4>.SampleBias(SamplerState, float3|half3|min10float3|min16float3, float1|half1|min10float1|min16float1, int2, float1|half1|min10float1|min16float1) Texture2DArray<float4>.SampleBias(SamplerState, float3|half3|min10float3|min16float3, float1|half1|min10float1|min16float1, int2, float1|half1|min10float1|min16float1, out uint status) at **Blur/MyBlur.hlsl(28)** (on gles3)
Compiling Subshader: 0, Pass: DownsampleHorizontal, Vertex program with STEREO_MULTIVIEW_ON
Platform defines: SHADER_API_MOBILE UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_PLATFORM_SUPPORTS_DEPTH_FETCH
Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING
I found the similar situation on the another question:
I want to know the causes and solutions about this problem.
Please help!
Thanks.