Differences between renderers

I’m trying to load a PDB file and I saw some example where they use two kind of renderers: WebGLRenderer, CSS2DRenderer. I also saw the CSS3DRenderer. I’m getting confuse because until now I have used only used WebGLRenderer. I have read the documentation but I don’t understand in what they are used for. What’s the difference?

The CSS renderers use CSS, the WebGLRenderer uses WebGL.

WebGL is much more powerful than CSS.

The CSS2DRenderer is useful for drawing HTML labels. In that example the 3D scene is rendered using the WebGLRenderer and the labels are in a second scene rendered using the CSS2DRenderer.

The CSS3DRenderer is more powerful than the CSS2DRenderer. But I’m not aware of any actual use for it other than as a technical showcase. Five years ago WebGL was less well supported so you could fallback to this renderer. Now, there’s no need to do this.

1 Like