Live data from Hacker News

Shader School - An introduction to GLSL shaders that runs in your web browser

github.com

41–49 of 49 posts

Re: Shader School - An introduction to GLSL shaders that runs in your web browser

#41
post #17

It seems really odd to me that GLSL and HLSL never unified into a common language.

HLSL is proprietary, and GLSL is open. It would be more odd if they had somehow unified. We still have plenty of proprietary vs open choices in computer languages - it doesn’t seem odd C++ and C# haven’t unified, does it?

Most people are probably working at the Unity or Unreal or Godot level anyway. Interaction with graphics APIs is pretty niche these days.

Re: Shader School - An introduction to GLSL shaders that runs in your web browser

#42
post #35
post #29

Earlier quoted context omitted.

Safari, made by Apple, was the lone holdout for WebGL2. You’re familiar with Apple’s relationship to Flash. No I won’t be surprised at all if Safari holds out on WebGPU, and it will be precisely because it offers functionality that Metal already has. > Enjoy your pyrrhic victory. I don’t understand why you’re repeatedly spending time on WebGL threads sharing sour grapes about Flash. They don’t compete. At all. WebGL…

As if WebGL and WebAssembly protect anything against abusive content creators. Worse, they can't be be turned off, can be used for tracking analytics as well and it isn't as if shaders can't be used for mining.

Not sure about other browsers but this is incorrect for Chrome and Firefox. They both have flags to disable WebGL and WASM. Please be careful not to spread misinformation, we owe it to ourselves to research our posts well.

Re: Shader School - An introduction to GLSL shaders that runs in your web browser

#43

https://thebookofshaders.com Still incomplete but browsable online and has its own interactive shader editor (try to click on values like floats or vectors) https://thebookofshaders.com/edit.php?log=161127202429

For anyone looking to pick up shaders for the first time, I recommend not beginning with the book of shaders. It’s an excellent introduction to a particularly heady slice of shader programming that, in my opinion, is a blind alley for folks new to shaders. I think focusing on fragment shaders rendering as full-screen quads makes the process feel more arcane and mind-shattering than it does when you consider the frag…

It hasn't been really added to for a long time, either. I would be surprised at this point if they decide to finish the thing, it feels like I've been checking for over a year now, but starting out on an in-progress book that isn't even 50% of the way there yet sure sounds like a great exercise in disappointment. I'd love to see it get there and cover things more widely in terms of setting up a development environment as well as everything you mentioned, though.

Re: Shader School - An introduction to GLSL shaders that runs in your web browser

#44
post #35

Earlier quoted context omitted.

As if WebGL and WebAssembly protect anything against abusive content creators. Worse, they can't be be turned off, can be used for tracking analytics as well and it isn't as if shaders can't be used for mining.

Not sure about other browsers but this is incorrect for Chrome and Firefox. They both have flags to disable WebGL and WASM. Please be careful not to spread misinformation, we owe it to ourselves to research our posts well.

We owe to ourselves to make computers better to the regular user.

Those flags are mostly only known to Webdevs and not directly exposed in the settings panel.

Re: Shader School - An introduction to GLSL shaders that runs in your web browser

#45
post #17

Earlier quoted context omitted.

HLSL is proprietary, and GLSL is open. It would be more odd if they had somehow unified. We still have plenty of proprietary vs open choices in computer languages - it doesn’t seem odd C++ and C# haven’t unified, does it?

Most people are probably working at the Unity or Unreal or Godot level anyway. Interaction with graphics APIs is pretty niche these days.

I definitely agree with thrower here, most people are focusing on big game engines and the demand are likely to increase.

Re: Shader School - An introduction to GLSL shaders that runs in your web browser

#46
post #24
post #21

Earlier quoted context omitted.

And with the latest release of Chrome/Edge you can now tinker with WebGPU stable release.

To note that WSGL still is pretty much WIP, with many semantics up in the air how they will look like in version 1.0.

It's also pretty broken for webassembly (which is where such a low-level API like WebGPU is going to have the biggest benefit), since Rust and C/C++ WebGPU bindings tend to fall out of API-compatibility with the browser implementation as Chrome and Firefox release new nightlies

Re: Shader School - An introduction to GLSL shaders that runs in your web browser

#47
post #27
post #26

Earlier quoted context omitted.

Not quite right, the Wii uses a GL based API similar to GL 3.3. Not all Nintendo consoles do so. And the switch has even GL 4.5, Vulkan and NVN to chose from. As anyone with some graphic programming experience in cross platform knows, even among GL variants, being a variant is enough for shaders not to compile the same way and require code rewrites.

What? The Wii uses the GX API from the GameCube [0], which is not similar at all to GL 3.3; it was developed in 1999. It does not have any form of programmable shaders; it uses TexEnv-style combinators. The Wii U has a custom GX2 API, where the official shader language is GLSL (again, see the Mario Kart 8 kiosk demo). The Switch has NVN, GL, Vulkan, where the official shader language for all three is GLSL (based on N…

Well, first of all, when I wrote Wii, I wasn't even thinking into the distinction between Wii and Wii U.

Secondly, the Cafe SDK documentation clearly refers to OpenGL 3.3, and GX2 is basically OpenGL in spirit while using naming and some utility functions, which fits "GL based API similar to GL 3.3".

I assume you also have access to Cafe documentation.

Re: Shader School - An introduction to GLSL shaders that runs in your web browser

#48
post #44

Earlier quoted context omitted.

Not sure about other browsers but this is incorrect for Chrome and Firefox. They both have flags to disable WebGL and WASM. Please be careful not to spread misinformation, we owe it to ourselves to research our posts well.

We owe to ourselves to make computers better to the regular user. Those flags are mostly only known to Webdevs and not directly exposed in the settings panel.

I don't think the regular user even knows what WebGL and WASM are, they will just wonder why their browser game isn't working and then google the cryptic setting that they have to change to get it to work.

Re: Shader School - An introduction to GLSL shaders that runs in your web browser

#49
post #44

Earlier quoted context omitted.

We owe to ourselves to make computers better to the regular user. Those flags are mostly only known to Webdevs and not directly exposed in the settings panel.

I don't think the regular user even knows what WebGL and WASM are, they will just wonder why their browser game isn't working and then google the cryptic setting that they have to change to get it to work.

Ah but the browser game will be working, while doing some extra non-game related activities.
Post reply on HN