https://github.com/mcgode/webgl-float-texture-support
A module containing a function allowing the user to check if the current browser supports WebGL float textures
https://github.com/mcgode/webgl-float-texture-support
check float support texture three-js threejs web-gl webgl
Last synced: 29 days ago
JSON representation
A module containing a function allowing the user to check if the current browser supports WebGL float textures
- Host: GitHub
- URL: https://github.com/mcgode/webgl-float-texture-support
- Owner: Mcgode
- License: mit
- Created: 2019-07-23T10:10:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-23T12:01:08.000Z (over 6 years ago)
- Last Synced: 2025-03-05T23:13:14.556Z (8 months ago)
- Topics: check, float, support, texture, three-js, threejs, web-gl, webgl
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webgl-float-texture-support
Most browsers today advertise the presence of the WebGL 1 float texture extension (known as 'OES_float_texture' extension),
but in reality don't support it, or support only very specific use cases only. Usually it is due to hardware limitations.
This module allows you to check the full support of WebGL 1 float textures extension.
## Installation and usage
### Using NodeJS
Install with the folowing command
``` bash
npm install webgl-float-texture-support --save
```
You can then use the module any way you want to
```javascript
// ES5 require
const WebGLFloatTextureSupport = require("webgl-float-texture-support");
// ES6 import
import WebGLFloatTextureSupport from "webgl-float-texture-support";
let floatTexturesSupported = WebGLFloatTextureSupport.check();
...
```
### For direct browser use
Copy the ```webgl-float-texture-support.js``` file to your script directory, then use the script in your page
```html
let floatTexturesSupported = WebGLFloatTextureSupport.check();
...
```