Rosetta is a library of graphics API shader snippets written in multiple different shading languages with the intent of providing an easy cross-reference resource for developers.
If, for example, you are familiar with WebGL, which uses GLSL shaders, but new to WebGPU, which uses WGSL shaders, this page will provide examples of how various tasks are accomplished in both languages so that you can see how the GLSL concepts you are already familiar with map to WGSL.
While we strive to ensure they are valid and functional, the shaders on this site are not necesarily meant to portray the best way to accomplish a particular effect or guaranteed to perform optimally on every system. The "ideal technique" to use is frequently situational, and it's difficult to give universal best practices. It is expected that developers will have to adjust any given shader for use within their own applications.