Types
The scalar and vector names are WGSL's, since one source has to serve both targets, and the GLSL writer spells each one in this target's terms. A declaration therefore says f32 where the emitted shader says float.
Scalars
floatf32inti32uintu32boolboolVectors
vec3vec3ivec3vec3iuvec3vec3ubvec3vec3bvec2 and vec4 read the same way, and so do the integer, unsigned and boolean forms of each. A vector of doubles has no form on either target and is rewritten into f32 lanes before the writer runs.
Matrices and arrays
mat4mat4mat3mat3mat2x3mat2x3A square matrix keeps the short name every driver's error messages use, and the other six shapes are written matCxR, columns then rows, the same way this target writes them.
float[4]array<f32, 4>float[2][f32, f32]A tuple is a list of a length the type fixes, so [f32, f32] and array<f32, 2> reach the same type. An array whose length is not known until the program runs is a storage buffer, which this target has no form for, so a module with one is rewritten to read from a data texture instead.
Samplers
This target fuses the texture and the sampler into one combined sampler, and WebGPU keeps them apart. A TypeShade file declares the two the WebGPU way and the GLSL writer fuses them, so the sampler argument disappears from every read and the binding it stood in is dropped from the layout the host binds.
sampler2Dtexture_2d<f32>usampler2Dtexture_2d<u32>isampler2Dtexture_2d<i32>sampler2DArraytexture_2d_array<f32>samplerCubetexture_cube<f32>sampler3Dtexture_3d<f32>sampler2DShadowtexture_depth_2dstandalone sampler — fused into the combined sampler2D
samplerstandalone comparison sampler — fused into the combined sampler2DShadow
sampler_comparisonA depth texture is the exception that proves the fusing: its combined type depends on how the module reads it, so the binding emit decides it. Every read of one this surface admits is a comparison, which makes it the shadow form.
Types with no GLSL form
Each of these is refused by the writer, and the cell beside it is the sentence the writer throws. A module carrying one still emits its WGSL, so these are the lines that make a shader WebGPU only.
texture_1d<f32>texture_1d<f32> has no GLSL ES 3.00 spelling (no 1d or cube-array samplers)
texture_cube_array<f32>texture_cube_array<f32> has no GLSL ES 3.00 spelling (no 1d or cube-array samplers)
texture_multisampled_2d<f32>multisampled texture load — sampler2DMS is ES 3.10 (msaaTextureLoad fails the module closed first)
texture_storage_2d<"rgba8unorm", "write">texture_storage_2d<rgba8unorm, write> has no GLSL ES 3.00 spelling (image load/store is ES 3.10)
atomic<u32>atomic<u32> has no GLSL ES 3.00 spelling (no storage buffers, no atomics)