TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A simple way to scale pixel art games

156 点作者 msk-lywenn5 个月前

15 条评论

MaxGripe5 个月前
The proper way to scale pixel graphics is by using nearest-neighbor (integer scaling) + CRT shader. Some games implement these filters excellently (eg Black Jewel, Hammerwatch (only the very first part), Animal Well), while others do it poorly (eg Skald).<p>Old consoles can be connected to an LCD monitor using a device called RetroTINK, which can add this effect perfectly. For static images, software like Photoshop, Affinity Photo is sufficient, but the goal should always be a CRT effect rather than generic scaling or fancy blur.<p>The point is that OBJECTIVELY pixel art looks incomparably better on CRT monitors, which is why this effect is emulated.
评论 #42371359 未加载
评论 #42369645 未加载
评论 #42370998 未加载
评论 #42471833 未加载
andrewmcwatters5 个月前
I’ve never seen good CRT physical emulation. But I also suspect it’s been long enough, that I just wouldn’t be able to tell the difference unless I had my old childhood bedroom Sanyo CRT to compare it to.<p>I’m not sure these come close because there’s some sort of physical element that would be hard to replicate unless you mapped the DPI of a screen to the “DPI” of a CRT.<p>Otherwise you’re just creating a weird facsimile in the same way that a lot of indie artists don’t produce pixel art that is actually pixel aligned. It’s ugly.
评论 #42369309 未加载
评论 #42371368 未加载
评论 #42369155 未加载
评论 #42368736 未加载
评论 #42372657 未加载
评论 #42369719 未加载
评论 #42368694 未加载
MetaWhirledPeas5 个月前
I find it amusing that we now obsess over the missing flaws in our pixel images. This is <i>exactly</i> analogous to the vinyl&#x2F;digital debate.<p>One way you can tell this nostalgic quest is a little silly is by the fact that new indie pixel art games are mostly excluded from this nitpicking.<p>I lived through the CRT &gt; LCD transition and the <i>only</i> downside to LCDs at the time was A) resolution interpolation, and B) motion blur. (Both of these issues have since been addressed.)<p>When CRTs were the norm we were never satisfied with their crispness. We always yearned for more clarity and a smaller dot pitch. When you saw a game displayed on a sharp monitor the improvement was both obvious and somewhat amazing. But now we&#x27;ve finally got what we want in the form of high-resolution LCDs and OLEDs and we&#x27;re trying hard to find new faults to be fixed, haha.<p>I am a bit of a hypocrite: I like a good CRT overlay on my retro games. It invokes a feeling. But I won&#x27;t say it&#x27;s <i>objectively</i> better.
评论 #42378395 未加载
BearOso5 个月前
I think this article from 1995 sums it up: <a href="http:&#x2F;&#x2F;alvyray.com&#x2F;Memos&#x2F;CG&#x2F;Microsoft&#x2F;6_pixel.pdf" rel="nofollow">http:&#x2F;&#x2F;alvyray.com&#x2F;Memos&#x2F;CG&#x2F;Microsoft&#x2F;6_pixel.pdf</a><p>Summation: A pixel is a &quot;picture element,&quot; a sampling of the intent.<p>On CRTs, the phosphors would sample the electron beams, which in turn sampled the memory. The phosphors, when hit, would diffuse in a perfectly round manner. As the voltage and intensity of the beam increases, the rays become more plentiful and the diffusion dilates; the output brightness becomes non-linear. In modern displays, this non-linearity is corrected for with &quot;gamma.&quot;<p>So we have two changes in modern displays that affect the way the picture is presented to the eyes:<p>1. Square edges. These don&#x27;t exist with CRTs, barring double-scan and prescaling.<p>2. Dilation. Pixels of higher brightness on a CRT occupy more area than that allocated for a pixel on an LCD. Brightness bleeds over into neighboring pixels, (importantly) making dark lines finer.<p>So, objectively, pixel art originally displayed on CRTs needs to be altered to have the same appearance on a LCD. The worst problem I see personally is that a bilinear-filter is often used, but it does the interpolation in gamma-space instead of linear. This causes dark lines and black areas to become more pronounced and blurry. This, coupled with the lack of dilation completely changes the character of the image.<p>About artistic intent, I can provide an anecdote as a counterexample: Shigeru Miyamoto said early sprites were first laid out on graph paper--as square blocks. There&#x27;s photos out there, and the blocks are filled in completely and are <i>very</i> square. This was early on, so I don&#x27;t know if they went back and adjusted them, or if later artists often used the intended display to model their art or not.
panzi5 个月前
On a page like this you should really use the CSS style:<p><pre><code> img { image-rendering: pixelated; }</code></pre>
评论 #42373307 未加载
评论 #42371044 未加载
ranger_danger5 个月前
<a href="https:&#x2F;&#x2F;thingsiplay.game.blog&#x2F;2024&#x2F;10&#x2F;19&#x2F;showcase-for-retroarch-shaders-2024&#x2F;" rel="nofollow">https:&#x2F;&#x2F;thingsiplay.game.blog&#x2F;2024&#x2F;10&#x2F;19&#x2F;showcase-for-retroa...</a>
alberth5 个月前
&gt;&gt; Center: Horizontal linear (proposed)<p>The image they used is biased toward horizontal.<p>The ground (and blocks beneath the ground) have strong horizontal lines. As does the fence wall behind the main character, and the main characters gun is horizontally elongated.
tuna745 个月前
&quot;Let’s do an experiment to make the VGA signal horizontal blur visible. I plugged my laptop to an LCD monitor with both HDMI and VGA cables and compared the results. This basically simulates a high quality CRT display and low quality VGA cable.&quot;<p>This is so wrong. CRTs have unique properties that can not really be replicated on an LCD monitor. You can get something similar with a really high refresh OLED panel, but that needs to be verified.
incrudible5 个月前
I do not like it. The best aesthetic on a modern display to me is integer scaling towards the nearest multiple. That looks nothing like a CRT and breaks with some assumptions artists made back then, but modern pixel art is designed for modern displays. If you want a CRT look there are sophisticated shaders that look decent on a high res screen, but nothing reproduces an actual CRT.
评论 #42375772 未加载
评论 #42375091 未加载
djmips5 个月前
Then they go on to try and compare to an composite output but they do this. &quot;Jazz Jackrabbit 2 through an interlaced composite video stream, grabbed with a cheap capture card.&quot; That&#x27;s not really how we experienced it though. Better to try and take a photograph of a CRT - although that&#x27;s challenging.
smusamashah5 个月前
But author did nearest neighbor on both axis instead of just vertical as proposed in tweet. Isn&#x27;t this different?
zokier5 个月前
It&#x27;s neat hack, but I&#x27;m not sure if there is much use for it. Of course this is much faster than doing CRT emulation, but in what context is that performance difference relevant? And I don&#x27;t know if there are any other major advantages here.
评论 #42377814 未加载
msk-lywenn5 个月前
I wonder if this could be implemented in the original OSSC.
imurray5 个月前
See also:<p><a href="https:&#x2F;&#x2F;www.scale2x.it&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.scale2x.it&#x2F;</a><p><a href="https:&#x2F;&#x2F;johanneskopf.de&#x2F;publications&#x2F;pixelart&#x2F;" rel="nofollow">https:&#x2F;&#x2F;johanneskopf.de&#x2F;publications&#x2F;pixelart&#x2F;</a>
评论 #42376945 未加载
jboy555 个月前
Its unfortunate that the author is using VGA signals on LCD displays as &quot;retro&quot;. I remember well my first experience using a LCD monitor for work. It was for my first &quot;Silicon Valley&quot; job in 1999 and it was a 15&quot; 1024x768 one, perhaps a ViewSonic. The CTO of the company I was working for was pushing them as it was the &quot;new thing&quot;. I requested a 19 inch Trinitron instead as the text was blurry with the VGA input and hurt my eyes, where as my Sony at home was noticeably sharper. I continued using CRTs up until probably 2005 (including a 21&quot; Sony that weighed &gt; 100lbs), it was at that time I got a graphics card with DVI output. At that point, I switched to a 20&quot; Dell LCD and never looked back.<p>tldr; VGA always looked like crap on most LCDs, imho they were almost unusable until DVI.