216 points · by khangnd · 5y ago · 124 comments
Reminds me of that fake windows update prank. We used to put it on people's screen and maximize it if they forgot to lock their pc.
The poor guy nearly had a heart attack when he turned the pc on and got confronted with it.
Hopefully someone could analysis how Microsoft achieved this effect and port it to a X11 compositor.
This tool can extract https://www.nirsoft.net/utils/resources_extract.html Then, cmd_decompiler.exe from there https://github.com/bo3b/3Dmigoto can either disassemble or decompile these binaries.
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. The sample locations are computed by vertex shaders somehow, and passed in TEXCOORD1 and TEXCOORD2 input registers. 2D sampler needs 2 floats for UV on input, texture coordinate vectors have up to 4 components on GPUs, so they’re packing 4 2D vectors into two 4D ones, and using xy and zw slices of these vectors. Because they probably using bilinear sampling (these are setup by CPU-running code, I have not looked), these 4 sample instructions are actually reading from 16 texels 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. If not zero, they convert the color to straight alpha, apply this formula https://entropymine.com/imageworsener/srgbformula/ to convert from sRGB to linear, then convert back to pre-multiplied alpha.
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.
7 was a huge step forward, with better performance than Vista and all kinds of QOL improvements (Windows Search, DX11 being some big ones).
10 also has some amazing improvements (automatic driver installs via Windows Update being the first thing that springs to mind[1]), but they've unfortunately let ads and anti-features (Bing, Cortana, App "Suggestions", News & Weather Bar) infiltrate and drag everything down. I cringe every time there's a major feature update, because I know I'll have to either change settings or download a tool to remove all of the bullshit they've just added.
[1]Yes, I know about FTDIgate. That was the exception, not the rule.
On initial install there were some Windows Store apps I didn’t care for (like Candy Crush) I just normally uninstalled and they never came back and no new apps ever installed themselves.
I disabled Cortana and other widgets I didn’t care for using the standard UI once ever and they never tried coming back on their own.
On feature updates it sometimes has a two minute wizard asking questions.
Maybe it’s because I live in South Africa, but I’ve never seen these Windows 10 adverts people keep complaining about. Maybe that little bit of clickable text on the login screen is what people are referring to? But before clicking I wouldn’t say for sure they’re adverts, they seem like very mild click bait. If they are adverts then inexcusable yes, but doesn’t bother me enough to get upset about.
I don’t mind telemetry in principle but it does bother me that like once every 2-4 weeks when it scans or something it’s a huge resource hog when doing so.
Otherwise, I feel Windows 10 is more performant (although does need SSD, which I would have had regardless) than Windows 7 and definitely has a more useful task manager.
Windows 10 really “just works” for me and I find myself spending minuscule to no time configuring it which means that I’m always doing what I want to actually be doing, working or playing games.
I tried to start cmd.exe and nothing happened. Tried a bunch of times more. Still nothing...
I was connected to a WiFi network that allowed ping to the entire Internet but not TCP connections. Then I switched to a WiFi network that allowed TCP connections to the Internet and 20+ cmd.exe instances started all at once.
I thought: "Wait, that can't be true", but it was reproducible.
This makes me wonder if launching programs takes longer on a slow internet connection.
I do not know if this still happens as I have only used Windows 10 on a handful of occasions since then.
That's the worst part of W10 for me. I have a tablet that was unusable until I learned about WuMgr because every day it would reinstall a broken touchscreen driver.
Windows 2000 was that stable, professional sweet spot for me, even at times NT 4. Zero fluff, relatively consistent experience, and little visible intergenerational technology accretion. The 2000 scheduler felt reasonably predictable and crisp, like how BSD on a workstation did compared to Linux, for the longest time. Unpredictable interface latency is a dealbreaker for me.
I never noticed too much of a stability difference between 2000 and XP, but I really disliked the fluffy chrome overlaid on the XP user shell.
As long as we are talking nostalgia, yes, I do miss some extremely consistent UI paradigms from Windows 3.X days (being able to productively drive the shell with a keyboard only though the ALT key accessors). Interface elements were extremely differentiated visually. (Seeing my father trip up on a high-investment hallmark of a touchscreen phone app, because the native widgets were flat and lacking visual differentiation this week was beyond painful. I do not like the direction of modern interface design is heading.)
Also it wasn't Windows 7 that first attempted that. PDAs back in ~2000 ran Windows CE with a Windows 95 / NT4 era UI. That also wasn't well optimised for smaller screens touch screens, hence the requirement to use a stylus. Then what followed was Windows Mobile 6, which looked more like XP, and 6.5 that had a vista / 7 type home screen but with classical Windows widgets. It wasn't until Metro (Win 8 / Mobile 7) when Microsoft really united the look and feel of Windows across all their platforms again, Xbox included.
Personally for me, XP was the decline of Microsoft's professional shell design. Windows 2000 was when Microsoft peaked. It was free from fluff but still had some minor tweaks of visual flair. XP was ugly, Vista and 7's widgets were poorly optimised for screen estate. And there after everything has taken a massive step backwards in usability.
Someone designed this and thought it was a good idea to have this in a 'professional' distribution of an OS.
XP just felt robust - almost like it was hardware itself.
* Inconsistent design: Starting from Windows 8, Microsoft switched to the Metro design. In Windows 10 Microsoft changed to Fluent design. However, even the Windows components themselves are not fully switched. In Windows 10 today you can find so many legacy designs that had not been removed. Windows 7, however, is pretty consistent from shell to explorer and control panels.
* Inefficient in user experience: Starting from Windows 8, MS started focusing on these so called touch devices, with the trade off of having larger margins, bigger buttons and slower animations, making user feel inefficient getting things done.
* Inefficient in performance: Windows 10 is slow as well, in a 2c 8g VBox VM, Windows 10 boot time is longer than Windows 7 and I have to wait for several seconds to open a UWP program, which is unbearable. Personally that is somehow related to the so called "modern" developing. For that I mean all the UWP / Web stuff. For instance, The Windows 10 start menu uses EdgeHTML inside (just press F7 and Caret Browsing dialog will show up).
* Anti-features: With the Microsoft's focus on "cloud" experience, Windows 10 added so many anti-features that I hate. Even though some are optional, I do not want an OS to contain any "cloud" based features and advertisements. Examples: Microsoft account, Telemetry, Consumer Experience (I mean all the pre-installed bullshit). I run several domains in my home and the first group policy I would apply to client computers is to turn off Telemetry (level 0 security), disable web search, disable spotlight and turn off the consumer experience.
I am not saying that Windows 10 is bad. It is, from a technical point of view, more advanced. However, because of all these bad designs I still think Windows 7 is the last Windows version I would feel satisfied.
This also happens in Calculator, and if you look at its source code [0], you’ll see it uses XAML views. I think Caret Browsing is a UWP feature, not necessarily an EdgeHTML thing.
[0]: https://github.com/microsoft/calculator/tree/master/src/Calc...
Consumers would adopt a retro look and feel to their apps if they could. Unfortunately, it's all just too disconnected to coordinate your whole wardrobe of apps to fit any one style.
XP did later evolve into something distinct in its own right but it took a few service packs to get there. However by that point I had already switched to Linux.
Personally I never got the appeal of Windows 7's theme either. I guess it's just what one grows up with. I grew up in an era where GUIs were maximized for low resolution displays and Windows 7's theme, much like XP's, wasted so much screen estate in comparison. This is less of an issue these days with high DPI screens. But old preferences die hard.
Just like Windows itself. Even Windows 11, despite the new coat of paint, still has code from -at least- the Windows 3.1 days.
On the other hand, 32bit Windows 10 is still going strong and there are probably plenty of windows 3.1 (and windows 3.0) applications that would still run there.
To the creator I’d suggest using photoshop or Figma to relocate the design elements, then translate the breakpoints to CSS to make the components more realistic.
Great start though!
There are spaces between tab button elements, the title bar buttons have excess space and incorrect borders, window buttons are the wrong size and use incorrectly scaled raster icons, the backdrop filter property isn’t applied correctly, the shadows on text boxes are incorrect, the tooltip padding is the wrong value and the wrong box size, buttons have the wrong borders, checkboxes have checks incorrectly applied, the author used raster icons for window buttons but not checkboxes for some reason. I could go on.
It reminds me of those yesteryear rips of future Windows themes on deviantART when those kids replicated the desktops of yet-to-be released versions of Windows but didn’t bother comparing the size or even the right colors of elements.
There are various Sketch and Figma plugins which let you modify the easing function and generate the CSS for it.
Also I love that it's an extension of XP.css, which is an extension of 98.css.
I recently went back and installed 2000 to make sure I wasn't forgetting something bad for usability in the UI about 2000 that others remember. Nope. I then installed XP to be sure with today's eyes it wasn't really better than 2000 and I just didn't realize it. Nope.
I didn't continue the experiment after that. I very clearly remember 7, since I still have to use it occasionally.
I see 2000s UI as being from a time when (for the most part) they weren't trying to impress you with the gloss on the UI. They were just trying to make it clear and usable. More modern iterations of Windows has some advancements in interactions but not much in the GUI controls themselves.
Me three! Windows 2000 is the best not just for usability, but still looks the best. No, all those fluff in XP and 7 don't make them look good, it make them look busy and dirty.
We may be in the minority, but only because relatively few people had a chance to use 2000 before it was replaced by XP one short year later. In contrast, people remember XP and 7 fondly because they kept using them for years and years since the subsequent releases, Vista and 8, were universally hated and panned.
Starting with XP more attention was paid to aesthetics and less to other qualities. E. g. XP controls consumed more screen space, which was a visible regression at times when 15-inch displays were still common.
Up until Windows 7 there was a classic desktop theme which was quite close to 2000 and I used it. Unfortunately Windows 10 has no such option. I use mostly FreeBSD and MacOS nowadays, but still have an old notebook with Windows 7 which I occasionally use. If I disliked Windows 10 less I would have upgraded it to Windows 10.
Next, the dropdown menu isn't like Win7, it follows your browser/operating system's theme. For example, on Firefox-based browsers running on GNU/Linux it follows your GTK theme, rather than the Win7 theme. On standard Chromium-based browsers, it shows it as dark blue rather than glassy light blue of Win7.
Next, the scrollbar doesn't show as the Win7 one on Firefox-based browsers, but does on Chromium ones for some reason.
You're right about the missing highlights. Those feel like something not too difficult to implement with a CSS animation and some extra colored borders, so hopefully someone will write a PR for that eventually.
Now after all this skeuomorphic design revolution it's so hard to tell, is it a button, text, link etc. It probably looks better but it is at the cost of extra thinking for the user.
8 months ago https://news.ycombinator.com/item?id=25601650
Just kidding, of course - nice work :)