Imagination PowerVR SDK Blog

textureCubeLod is removed after version 140

pvrvframe

#1

Hi.



I am using PVRVFrame to emulate Open GLES in a Windows platform. When I try to compile a shader that is using the textureCubeLodEXT, I get the following error:


error C7616: global function textureCubeLod is removed after version 140


I have tried to place #version 140 at the begining of the shader, but nothing changes.

Any help would be appreciated.

Cheers.

#2

Hi turrican

This is a bug in the GLSLES to GLSL translator, where textureCubeLod isn’t being translated to the equivalent textureLod. We’ve fixed this for the next release.

The same bug exists for texture2DLod and texture2DProjLod. As a workaround to get the shader compiling with PVRVFrame, you could do the replacements manually, though you’ll have to use the proper names when running on a device. The relevant translations are:

textureCubeLod -> textureLod
texture2DLod -> textureLod
texture2DProjLod ->textureProjLod