I’m trying to use tex2Dbias in a surface shader to get “free” blurring of a texture, it doesn’t seem to be working.
sampler2D _Reflect;
half _Roughness;
void surf(...) {
// ...
o.Emission = tex2Dbias(_Reflect, half4(reflUv, 0.0, _Roughness);
}
Instead, I get these errors:
Shader error in 'Custom/Metallic': Program 'frag_surf', function "ddx" not supported in this profile at line 29
Shader error in 'Custom/Metallic': Program 'frag_surf', function "ddy" not supported in this profile at line 29
Shader error in 'Custom/Metallic': Program 'frag_surf', function "tex2D" not supported in this profile at line 29
Looking at the GLSL ES 2.0 specs texture2D does support a LOD bias. Is this a Cg limitation/bug or am I doing something wrong?