"# define dp_offsetmapping_dFdx dFdx\n"
"# define dp_offsetmapping_dFdy dFdy\n"
"# define dp_textureGrad textureGrad\n"
+"# define dp_textureOffset(a,b,c,d) textureOffset(a,b,ivec2(c,d))\n"
"# define dp_texture2D texture\n"
"# define dp_texture3D texture\n"
"# define dp_textureCube texture\n"
"# define dp_offsetmapping_dFdx(a) vec2(0.0, 0.0)\n"
"# define dp_offsetmapping_dFdy(a) vec2(0.0, 0.0)\n"
"# define dp_textureGrad(a,b,c,d) texture2D(a,b)\n"
+"# define dp_textureOffset(a,b,c,d) texture2DOffset(a,b,ivec2(c,d))\n"
"# define dp_texture2D texture2D\n"
"# define dp_texture3D texture3D\n"
"# define dp_textureCube textureCube\n"
"# endif\n"
"# else\n"
"# ifdef GL_EXT_gpu_shader4\n"
-"# define texval(x, y) texture2DOffset(Texture_ShadowMap2D, center, ivec2(x, y)).r\n"
+"# define texval(x, y) dp_textureOffset(Texture_ShadowMap2D, center, x, y).r\n"
"# else\n"
"# define texval(x, y) dp_texture2D(Texture_ShadowMap2D, center + vec2(x, y)*ShadowMap_TextureScale).r \n"
"# endif\n"