-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
36 lines (23 loc) · 1.38 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
title: WEBGL_debug_shaders extension
short-title: WEBGL_debug_shaders
slug: Web/API/WEBGL_debug_shaders
page-type: webgl-extension
browser-compat: api.WEBGL_debug_shaders
---
{{APIRef("WebGL")}}
The **`WEBGL_debug_shaders`** extension is part of the [WebGL API](/en-US/docs/Web/API/WebGL_API) and exposes a method to debug shaders from privileged contexts.
This extension is not directly available to websites as the way of how the shader is translated may uncover personally-identifiable information to the web page about the kind of graphics card in the user's computer.
WebGL extensions are available using the {{domxref("WebGLRenderingContext.getExtension()")}} method. For more information, see also [Using Extensions](/en-US/docs/Web/API/WebGL_API/Using_Extensions) in the [WebGL tutorial](/en-US/docs/Web/API/WebGL_API/Tutorial).
> **Note:** Depending on the privacy settings of the browser, this extension might only be available to privileged contexts.
>
> This extension is available to both, {{domxref("WebGLRenderingContext", "WebGL1", "", 1)}} and {{domxref("WebGL2RenderingContext", "WebGL2", "", 1)}} contexts.
## Instance methods
- {{domxref("WEBGL_debug_shaders.getTranslatedShaderSource()")}}
- : Returns the translated shader source.
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{domxref("WebGLRenderingContext.getExtension()")}}