Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Windows Tip - OpenGL ► «««« 10 / 18 »»»»

What about geometry and other shaders in WebGL?


Good question! When it comes to geometry shaders or other shader types, WebGL , OpenGL ES , and OpenGL 2.1/3.x are equipped differently. Here's a detailed look:






1. Vertex and fragment shaders: Standard in WebGL
2. Geometry shaders: Only in OpenGL 3.2 and higher
3. Tessellation shaders and compute shaders
4. Workarounds for missing shaders in WebGL
5. Conclusion






1.) Vertex and fragment shaders: Standard in WebGL




- WebGL 1.0 (based on OpenGL ES 2.0) only supports two shader types :
- Vertex shaders (processing geometry per vertex)
- Fragment shaders (calculating pixel or fragment color)


- WebGL 2.0 (based on OpenGL ES 3.0) remains limited to the vertex and fragment shader , but offers extended features:
- Transform feedback for processing geometry without geometry shaders.
- Improved support for Uniform Buffer Objects (UBOs) and instancing .







2.) Geometry shader: Only in OpenGL 3.2 and higher




- Geometry shaders allow the creation of new geometry (points, lines, or triangles) from existing primitives.

- They are executed between the vertex shader and the rasterizer .

OpenGL 2.1 (GLSL 120): No geometry shader



- Geometry shaders are not available in OpenGL 2.1 (and GLSL 120) . - Geometry shaders were introduced with OpenGL 3.2 and GLSL 150.



WebGL: No geometry shader support



- WebGL 1.0 and WebGL 2.0 do not support geometry shaders .

- You can only generate new geometry indirectly, e.g., via instancing or transform feedback in WebGL 2.0.







3.) Tessellation shaders and compute shaders




- Tessellation shaders (for geometry subdivision) and compute shaders (for GPU calculations) are only available in OpenGL 4.0+ .

- WebGL 1.0 and 2.0 do not support these shader types .

Shader typeOpenGL 2.1 (GLSL 120)OpenGL 3.2+WebGL 1.0WebGL 2.0
Vertex shader ✅ ✅ ✅ ✅
Fragment shader ✅ ✅ ✅ ✅
Geometry shader ❌ ✅ (from GLSL 150) ❌ ❌
Tessellation shader ❌ ✅ (OpenGL 4.0+) ❌ ❌
Compute shader ❌ ✅ (OpenGL 4.3+) ❌ ❌








4.) Workarounds for missing shaders in WebGL



You can also achieve similar effects without geometry shaders or tessellation shaders in WebGL:

1. Instancing (WebGL 2.0):
- Repeating geometry with instanced arrays .
- For example, many copies of a triangle can be generated and moved.

2. Vertex shaders for procedural geometry :
- In a vertex shader, you can dynamically calculate vertex positions to change geometry.

3. Transform feedback (WebGL 2.0) :
- Calculations from the vertex shader can be written to a buffer object and reused.

4. GPU particle systems :
- Use vertex and fragment shaders to simulate complex particle effects without geometry shaders.







5.) Conclusion




- Geometry shaders, tessellation shaders, and compute shaders are not part of WebGL or OpenGL 2.1 (GLSL 120) .

- In WebGL, you are limited to vertex shaders and fragment shaders .

- For advanced geometry manipulation in WebGL 2.0, you can use workarounds such as instancing or transform feedback .



Updated on: 12 April 2025 20:40 Windows
Keywords: opengl, what, about, geometry, other, shaders, webgl, good, question, when, comes, shader, types, equipped, differently, here, detailed


Similar information on the page

Windows

... Difference between vertex and fragment shaders in OpenGL?


In OpenGL, vertex and fragment shaders are used in different ways and have different responsibilities Contents: 1. Difference between vertex and fragment
Windows

... What are the main differences between DirectX and OpenGL?


DirectX and OpenGL are both graphics APIs used for developing games and other graphics-intensive applications. However, they have some key differences: 1.
Windows

... Function glPushMatrix and glPopMatrix well explained?


The OpenGL functions `glPushMatrix;` and `glPopMatrix;` are used to save and restore the current transformation matrix . They help isolate transformations
Windows

... Please explain glLoadIdentity quickly?


The OpenGL function `glLoadIdentity;` is used to reset the current model-view matrix or any other active matrix to the identity matrix . `glLoadIdentity;`
Windows

... glMatrix with Javascript, mat2, mat3, mat4, vec2, vec3, vec4, ...


It is easy to work with vectors and matrices using glMatrix based on Javascript, e.g. mat2, mat3, mat4, vec2, vec3, vec4, glMatrix is ​​designed to
Windows

... OpenGL occlusion culling system?


Like all culling algorithms, these are all a kind of bounding box of the scene to test it all at once Typically, a buffer is encoded that contains all the
Windows

... Using OpenGL Frame Buffers and advantages?


In OpenGL you can use frame buffers and benefit from post-processing, comparing, to improve quality or save time  A frame buffer in OpenGL is a structure



▲ Back to the top ▲



... OpenGL Tip



3D.Benchmark.OK # AlwaysMouseWheel # AutoHideDesktopIcons # AutoPowerOptionsOK # ClassicDesktopClock # DesktopDigitalClock # DesktopNoteOK # DesktopOK # DontSleep # Edge-Chromium # ExperienceIndexOK # Find.Same.Images.OK # FontViewOK # GetPixelColor # GetWindowText # Internet # IsMyHdOK # KeepMouseSpeedOK # NewFileTime # OpenCloseDriveEject # OpenGL # PhotoResizerOK # Q-Dir # QuickMemoryTestOK # QuickTextPaste # Registry # ShortDoorNote # StressMyPC # System # TheAeroClock # Tools # Version # WinScan2PDF #




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + MineSweeperOK
  + SolitaireOK
  + ProcessKO
  + WinBin2Iso
  + ThisIsMyFile
  + TheAeroClock
  + Bitte.Wenden
  + CoronaKO
  + MatriX.CoronaKO
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | gc24b | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2026 by Nenad Hrg ERR2: softwareok.de • softwareok.com • softwareok.com • softwareok.eu
64.773 msec.


>> ☕ Buy SoftwareOK a Coffee ☕ <<



► Sort the pictures for similarity and highlight better photos! ◄
► StressTheGPU is the next generation GPU stress test! ◄
► Windows security icon in the Windows 11 taskbar on / off? ◄
► Restart Windows 11 and Forced Restart! ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....