# EXT\_shader\_texture\_lod extension in PVRVFrame

**URL:** <https://forums.imgtec.com/t/ext-shader-texture-lod-extension-in-pvrvframe/2169>\
**Category:** PowerVR Insider\
**Tags:** pvrvframe, pvrshadereditor\
**Created:** [September 22, 2014, 7:53am UTC](https://forums.imgtec.com/t/ext-shader-texture-lod-extension-in-pvrvframe/2169 "2014-09-22T07:53:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganesh-2](https://avatars.discourse-cdn.com/v4/letter/g/4491bb/32.png) [@ganesh-2](https://forums.imgtec.com/u/ganesh-2)\
**Post date:** [September 22, 2014, 7:53am UTC](https://forums.imgtec.com/t/ext-shader-texture-lod-extension-in-pvrvframe/2169/1 "2014-09-22T07:53:29Z")

</div>

Hello,  
  
  
  
It says in the documentation of PVRVFrame that EXT\_shader\_texture\_lod shader extension is supported , however i am unable to compile the fragment shader using  
  
textureCubeLODEXT , it compiles fine in PVRShaderEditor, but when i use it in my application, i get error saying  
  
  
  
The shader passed opengl es validation, but the translated code could not be compiled, saying the function is not found, however if i use opengl es 3.0 version in the shader definition and use textureLOD it works fine, i have an radeon r9 280x as the GPU,  
  
Am i doing something wrong in the initialization code of the context? , do i have a set a flag or something in the initialization code?  
  
  
  
Regards,  
  
Gana

---

<div class="post-metadata">

**Author:** ![ChrisPenrose](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@ChrisPenrose](https://forums.imgtec.com/u/ChrisPenrose)\
**Post date:** [September 22, 2014, 8:12am UTC](https://forums.imgtec.com/t/ext-shader-texture-lod-extension-in-pvrvframe/2169/2 "2014-09-22T08:12:04Z")

</div>

Hi Ganesh  
  
  
  
Is it possible for you to post the full error message here? I think I have found the problem already, but I just want to be sure. It looks like PVRVFrame isn’t translating textureCubeLODEXT due to a typo in the translator, so you’re probably not doing anything wrong, but found a bug in PVRVFrame.

---

<div class="post-metadata">

**Author:** ![ganesh-2](https://avatars.discourse-cdn.com/v4/letter/g/4491bb/32.png) [@ganesh-2](https://forums.imgtec.com/u/ganesh-2)\
**Post date:** [September 22, 2014, 8:37am UTC](https://forums.imgtec.com/t/ext-shader-texture-lod-extension-in-pvrvframe/2169/3 "2014-09-22T08:37:28Z")

</div>

Hi Chris,  
  
  
  
Here is the required data  
  
  
  
Shader:  
  
  
  
#extension GL\_EXT\_shader\_texture\_lod:enable  
  
  
  
precision mediump float;  
  
  
  
uniform samplerCube TextureMap;  
  
uniform float MipLevel;  
  
  
  
varying vec3 l\_lookUp;  
  
  
  
void main()  
  
{  
  
gl\_FragColor = textureCubeLodEXT(TextureMap,l\_lookUp,MipLevel);  
  
}  
  
  
  
  
  
  
  
In PVRVFrame window:  
  
Error:  
  
The shader passed OpenGL ES shader validation, but the host system failed to compile the translated OpenGL shader. Call glGetShaderInfoLog to retrieve the shader info log from OpenGL.  
  
  
  
Shader info log  
  
Fragment shader failed to compile with the following errors:  
  
ERROR: 0:36: error(#143) Undeclared identifier: textureCubeLodEXT  
  
ERROR: 0:36: error(#202) No matching overloaded function found: textureCubeLodEXT

---

<div class="post-metadata">

**Author:** ![ChrisPenrose](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@ChrisPenrose](https://forums.imgtec.com/u/ChrisPenrose)\
**Post date:** [September 22, 2014, 9:05am UTC](https://forums.imgtec.com/t/ext-shader-texture-lod-extension-in-pvrvframe/2169/4 "2014-09-22T09:05:48Z")

</div>

Thanks Ganesh. This is definitely a bug in the emulator. I have pushed a fix into the next SDK release.  
  
  
  
We should be releasing in the next few weeks, but if you like you can request a beta version of PVRVFrame by creating a ticket at [https://pvrsupport.imgtec.com](https://pvrsupport.imgtec.com).

---

<div class="post-metadata">

**Author:** ![ganesh-2](https://avatars.discourse-cdn.com/v4/letter/g/4491bb/32.png) [@ganesh-2](https://forums.imgtec.com/u/ganesh-2)\
**Post date:** [September 22, 2014, 10:02am UTC](https://forums.imgtec.com/t/ext-shader-texture-lod-extension-in-pvrvframe/2169/5 "2014-09-22T10:02:39Z")

</div>

Thanks Chris, i will be raising a ticked for the beta version and mark this as answered
