How to enable GLSL extensions like `OES_standard_derivatives`?
See original GitHub issueFeature
How to enable GLSL extensions like OES_standard_derivatives
?
library version
├── gl-react@3.15.0
└── gl-react-dom@3.15.0
Expected behavior
I tried using the onContextCreate
function of the gl-react-dom Surface which exposes the gl
instance to enable the extension via gl.getExtension('OES_standard_derivatives')
Actual behavior
Assigning a custom function to onContextCreate actually silently prevents any rendering from happening!
Is there another way to enable additional WebGL extensions?
Thx
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
OES_standard_derivatives - Web APIs - MDN Web Docs
The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx , dFdy , and fwidth .
Read more >Enabling an extension on a Three.js shader - Stack Overflow
You have to use the renderer's dom element: var gl = renderer.domElement.getContext('webgl') || renderer.domElement.
Read more >OES Standard Derivatives - Web APIs - W3cubDocs
The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth.
Read more >GL_OES_standard_derivatives - Khronos Registry
The built-in derivative functions dFdx, dFdy, and fwidth are optional, and must be enabled by #extension GL_OES_standard_derivatives : enable before being ...
Read more >GLSL language integration - Visual Studio Marketplace
Extension for Visual Studio - VSIX Project that provides GLSL language ... You can use environment variables, like %SystemDrive% in your ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @brysonandrew, good to know that works. In the end I found a way to do what I needed without the derivatives extension, but good to know for the future 👍
@efirdc You’re welcome, yes, componentDidMount.
Here is a gist of the whole component
Do you have something like this is your shader -
?