Web Excursions 2021-08-30

Science in the shape of train wheels; how Windows 7 computes the Aero effect; changes in notification sounds in Windows 11.


Train Wheels are Not as Simple as They Seem

  • Train wheels are conical in shape.

    • That means they have a varying diameter at different points of contact.

  • Now, suppose the track turns right.

    • The train’s left wheels now have to travel more than the right wheels

    • because at the turn the track on the left is longer.

  • Since the wheels are conical in shape, the whole wheel-set shifts a bit to the left, if the track curves right.

  • Now the point of contact of the left wheel is at a larger diameter of the cone.

    • While the smaller wheel Correction from the toptouches at a point where the diameter of the wheel is lesser.

    • Therefore, if the left wheel now makes one circle it travels further than the right wheels and the train moves along the curve smoothly.


A CSS framework to recreate Windows 7 GUI

yuuta:

  • I really enjoy the Aero glass effect from Windows 7 and feel unfortunate when Microsoft removed it in Windows 8. Hopefully someone could analysis how Microsoft achieved this effect and port it to a X11 compositor.

Const-me:

  • These shaders are *.bin resources embedded in dwmcore.dll.

  • The pixel shaders there include both ps_4_0 code for new GPUs, and ps_2_0 for running on DirectX 9 GPUs.

    • This makes the disassembler slightly more useful than the decompiler, the *.asm will contain both programs.

  • They first sample from 4 locations of the source texture.

  • Then, they compute the average of the 4 colors.

    • At this stage, they’re using pre-multiplied alpha.

  • For the next step of the pixel shader, they compare alpha with zero.

  • For the last step, they’re applying linear transformation to the color using input values passed in the constant buffer.

    • This part varies a lot for different shaders.

    • Some shaders only using a single scalar constant, and returning (alpha.wwww*result)^2 color.

    • Other shaders are using 4x5 transformation matrix in the constant buffer to transform the final color.

  • P.S. There’re 282 compiled pixel shaders there, and I only looked at a few of them.

    • It’s very possible some other ones are doing something completely different.

    • I think Microsoft compiled them from just a few source *.hlsl files, with different preprocessor macros.

    • At least that’s how I would do that if I were implementing these effects.


Windows 11 gets new and less stressful notification sounds

  • CNBC reported last week on how Microsoft has replaced the notification sounds in Windows 11 with calmer and “less overwhelming” versions.

  • I get stressed by the audio alerts from my Windows PC.

    • The sounds are loud and insistent, and they disrupt my thoughts and my work.

    • They demand focus and attention,

      • even though most of the sound alerts are unimportant and

      • would be better served by no sound or at least a subtler audio queue.

  • In Windows 11, there’ll be two different sound themes: one for the Dark color mode and one for Light mode.

    • The two themes sound similar, but the Dark mode sounds are more subdued than the Light mode sounds.

    • Both variants are less intense, disruptive, and stressful than the alerts used in earlier versions of Windows.

  • The different soundscape for Dark mode seems to have been designed to make your PC quieter in the evenings.

  • You can change the default sounds to get an even calmer experience on your Windows PC.

    • Press Windows key + R, type mmsys.cpl, and

    • press Enter to open the Sound control dialog.

    • Switch to the Sounds tab.

    • From the Sound control dialog, you can change or disable different system sounds.

  • You can listen to all the sound options in the dialog, or by looking for .wav audio files in the C:\Windows\Media\ and C:\Windows\Media\dm\ (dark-mode versions) folders.