Imagination PowerVR SDK Blog

EXT_shader_texture_lod extension in PVRVFrame

pvrvframe
pvrshadereditor

#1

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


#2

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.


#3

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



#4

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.


#5

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