In webGL1 it was possible to test the availability of a GLSL extension from a fragment shader using (for instance) #ifdef GL_EXT_shader_texture_lod .
It seems to no longer be working in webGL2 (=GLSL-ES3.0): Extensions are not the same, but for instance #ifdef GL_EXT_color_buffer_float seems false despite https://webglreport.com/?v=2 tells that the extension is there.
Or what am I doing wrong ?
GLSL-ES3(webGL2): how to test extensions from fragment shader?
516 Views Asked by Fabrice NEYRET At
1
There are 1 best solutions below
Related Questions in GLSL
- How to get shader version from QOpenGLShader?
- Tesselation result flickering - OpenGL/GLSL
- Water rendering in opengl
- Should Meshes with and without Skeleton use different Shaders?
- PBO Indexed Color Texture Rendering with Palette in Fragment Shader not working
- Modern GLSL ( opengl 3+ ) : Implementing phong effect correctly;
- Passing grayscale OpenCV image to an OpenGL texture
- OpenGL / weight order independent transparency
- GLSL: How to calculate fragments output RGB value based on Photoshops curve value?
- Fragment shader does not show any colour when compiled with vs2013
- How to access all vertexes within the same patch in Tessellation Control Shader
- OpenGL GLSL: How to implement the concept of gradient map in photoshop using fragment shader?
- Ambient and Specular lighting not working correctly in GLSL
- How to debug transforms in glsl vertex shaders in lwjgl
- Blender GLSL Export to THREE.js
Related Questions in FRAGMENT-SHADER
- PBO Indexed Color Texture Rendering with Palette in Fragment Shader not working
- GLSL Shader Draws Only Black Screen LWJGL
- Is this GLSL program correct? My cubes are solid black
- GLSL noise function on devices with no high precision fragment shader
- JMonkey Filter Shader - get World Position of Fragment
- Three.js, custom shader and png texture with transparency
- Threejs: make custom shader match the standard rendering
- SKShader to create parallax background
- Switching from 3D to 2D in OpenGL
- Getting exact pixel from texture
- Why is my texture mapping with my fragment shader generating lines at texture coordinate jumps?
- How to make the line color flat instead of gradient in OpengGL ES 2.0?
- WebGL: 2D Fragment Shader With Dynamic Data
- How to disable color interpolation in opengl es 2.0?
- Replace alpha for texture into the shader
Related Questions in GLSLES
- Is there a performance penalty for enabling OpenGL ES extensions?
- Shader looks terrible on iOS but fine on Windows
- Save world transform for the same model in multiple pass rendering
- GLSL Circle gets eliptical on Rendering on screen?
- Parralax mapping does not work correctly using OpenGL and GLSL
- OpenGL ES 3.0 matrix array only using first matrix
- GLSL (ES 3.0): reference a uniform using another uniform's location and an offset
- Shadow mapping does not work correctly using GLSL and OpenGL
- GLSL ES 3.0 - uniform in both vertex and fragment shader, and max vertex/fragment uniform vectors
- Learning GLSL from glsl.heroku.com
- Quality loss (bluriness) in shader
- OpenGL ES3 Shadow map problems
- How do you pack one 32 bit integers into 4, 8bit ints in GLSL / WebGL?
- Float modulo operator that includes the upper value
- How can I get more helpful GLSL compilation errors?
Related Questions in WEBGL2
- How to pack/unpack 11 and 10 bit floats in JavaScript for WebGL2
- Linear filtering of floating point textures in WebGL2
- How to render multiple textures/images (jpeg, pngs) using webgl2?
- WebGL - Sending arraybuffer VS sending image/canvas/bitmap from CPU to GPU
- How to repeat only the part of texture?
- How to create WebGL 2 renderer in iOS?
- When drawing multiple objects, when do you create a new vertex array object?
- webgl2 problem with rendering opaque and translucent triangles
- Change camera view for RENDERBUFFER but not for main render view
- Stencil buffer from transparent texture for occlusion query
- How does this code work with multiple buffer bound to same target?
- How to enable multisampling in WebGL2 rust / web_sys
- Updating WebGL texture from color buffer during creation fails
- I can't detect real reason for gl.LINK_STATUS return failed state
- I Can’t get derivatives (dFdx) working in my shader with WebGL1 or 2
Related Questions in WEBGL-EXTENSIONS
- Loading PNG images but using them as COMPRESSED_RGBA_S3TC_DXT5_EXT in WebGL?
- WebGL FrameBuffer - Render Depth Texture
- WebGL performance problems with a >65k vertex mesh on a MacBook Pro
- WebGL: Declining support for OES_texture_float on Android
- WEBGL_draw_buffers not supported on latest Firefox / Chrome
- mat3 attribute in WebGL
- Three.js Error creating WebGL context
- GLSL-ES3(webGL2): how to test extensions from fragment shader?
- Is it possible to run #version 120 shaders with WebGL
- WebGL - Width, height parameters passed in validateCompressedTexSubDimensions() function?
- Why sRGB extension has lost a constant?
- The complete list of promoted extensions in WebGL2
- OES_texture_float extension use
- Supporting WebGL1 + WebGL2
- Unity web gl game wont display loading screen and just is blank screen
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It's up to the extension whether or not it adds a flag to GLSL
EXT_shader_texture_lodis specifically an extension that effects GLSL. It's spec says it adds that macroEXT_color_buffer_floatis not an extension that affects GLSL. It's spec does not mention any GLSL macros. No change from WebGL1Those flags though are mostly nonsense in WebGL anyway. You can trivially do your own string manipulation
Or a thousand other ways to manipulate shader strings.
Here's another
etc...
Also since there never was a
GL_EXT_color_buffer_floateven in OpenGL there isn't much point in calling the macroGL_EXT_color_buffer_float. In fact it would arguably be a bad idea because it would end up looking like an official specified macro even though it's not. Best to chose your own name that doesn't start withGL_.Also consider that using
#ifdefmight not even be a good idea since you can just use string manipulation. For example