How to handle "texture2DGradEXT"

Started by Stefan, December 15, 2015, 09:02:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stefan

Shadertoy demo "Arlo" makes heavy use of texture2DGradEXT

I tried to port the demo to GeeXLab but Intel compiler crashes, AMD and NVIDIA complain about "OpenGL/ES doesn't allow use of reserved word texture2DGradEXT" etc.

Adding
#extension GL_EXT_shader_texture_lod : enable
#extension GL_OES_standard_derivatives : enable

to the beginning of the pixel shader didn't help

What am i missing?

JeGX

texture2DGradEXT can be replaced by textureGrad in OpenGL 3.2+ (#version 150 in the GLSL shader). But I didn't manage to run the demo on my GTX 960. There is something else in the pixel shader that is not appreciated by the GTX 960.

Stefan

Made another test: replaced texture2DGradEXT with texture2DGradARB
and added #extension GL_ARB_shader_texture_lod : enable

Compiles successfully, but renders blank screen with 100% GPU load

Stefan

Download Arlo fixed

Mea culpa!
Looks like it's mandatory to add iChannel programs in update_scene, if there is more than 1 texture



Stefan

Found another picky demo Mushroom
Ported to GeeXLab

NVIDIA compiler warning: OpenGL/ES doesn't allow use of reserved word texture2DGradEXT
Again i replaced texture2DGradEXT with texture2DGradARB

Additionally #define VIS_SAMPLES 2 causes NVIDIA compiler warning:
0(442) : warning C7614: OpenGL/ES doesn't allow use of reserved word texture2DLodEXT
0(442) : warning C7506: OpenGL does not define the global function texture2DLodEXT
0(61) : warning C7050: "drddx" might be used before being initialized
0(62) : warning C7050: "drddy" might be used before being initialized