Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
November 24, 2017
arrowPress Releases






If you enjoy reading this site, you might also want to check out these UBM Tech sites:


 

Does this technology make AA obsolete? Is it new technology? If so I want credit and would appreciate some assistance.

by Mick Pearson on 08/28/15 01:53:00 pm

1 comments Share on Twitter    RSS

The following blog post, unless otherwise noted, was written by a member of Gamasutraís community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.

 

I am an absolute outsider in the game industry. I want no part in it. Yet something happened a few days ago, that I think must be shared. I think this changes everything for video game like media.

First, I'd approached Michael Samyn of Tale of Tales game about this. He is the only person I felt like confiding in. But he wasn't as receptive and enthusiastic as I'd have liked. I work privately on private projects and think very little about the video game industry. I believe everyone within it is completely misleading each other and producing poor results with diminishing returns. So I am a nobody. And I am a grown man who has always worked on technology but who has no contacts or want to interface with contacts, employer, lawyers and bankers. So I have this tech, and no real outlet. So I decided what probably makes the most sense based on what I've observed, is to just publish this here. In some ways this is simpler than trying to make private arrangements.


Now it's possible I have egg on my face, and this is nothing new. But it's my educated guess that it's absolutely new, or otherwise it would be standard practice and a topic of study that is doggedly pursued by hardware vendors. I work with unorthodox techniques that sometimes appear anachronistic. I'm not an oddity, this is just what gets results in my opinion. Creates the best images.


Lately I was pressed to play someone's game that was made with the software I am responsible for maintaining, but it wouldn't play on my workstation. So first I disabled anti-aliasing (MSAA) and that helped a lot, but I began to long for the effect's return. So I began developing alternative forms that are "free" in computational terms. And I got far until I arrived at very difficult cases. High contrast, long run lines. I had a taste for no-cost AA, I wanted to cross the finish line, and that forced me to be creative.


Now I have absolutely straight lines, it looks like a movie, and it isn't AA per se. It's a purely 3D effect. It works by using the refresh rate to superimpose the jagged staircases that AA tries to smudge. Instead of AA the eye does all of the work. The basic theory is different from AA, since it cannot be captured in a single still image, and it requires native resolution, and the final more or less perfected technique works alright at 30fps on a 60fps refresh rate (it would probably work better if the refresh rate was locked, but I think personally dedicated fullscreen should've died 15 years ago) but really requires a steady 60fps to create the perfect illusion.


It's very primitive at this stage, but beats all forms of realtime 3D imagining hands down, at the cost of a few instructions in the vertex shader. It comes in three or four basic varieties, but I will identify the one that is probably most desirable for basic needs. This can bring television like 3D images to GPU-based integrated graphics chips. Basically it can make realtime-3D mainstream.


The theory is to change the staircases that the rasterizer generates every frame, ideally without moving the pixels themselves. The different versions have different trade-offs, but the one that has best results right now for me doesn't necessarily have to snap to pixels, it snaps to half-pixels and can work without doing so, because two frames are blended in the final image. Which can only be done if the effect is at full power, since otherwise the blending causes knots to appear at the joints (which can be a good thing in non-blended/blurred versions since it isolates the smoothing to the joints)


The shader code looks like this:


float4 hvp = rcpViewport*Out.pos.w;
//NOTE: this line is not strictly necessary
//when at "full power" with a motion blur
Out.pos.xy-=fmod(Out.pos.xy,hvp.xy);

//sign may be unnecessary
Out.pos.xy+=hvp.zw*sign(Out.pos.xy);


(the Gamasutra form forces a linebreak in the code)


The fmod can be optional if you don't mind some side effects.

The vertex shader constants are setup like so:

//half pixel with full pixel coverage version

//0.98 is to be slightly less than 1 to stay inside the pixel

unsigned period = 3; float staircase =
(0.5f-float(DDRAW::noFlips%period)/(period-1))*0.98f;
float c[4] = {rcpw,rcph,rcpw+rcpw*staircase,rcph+rcph*staircase};
dx_d3d9c_vsconstant(DDRAW::vsPresentState,c);

(again, Gamasutra form forces the linebreak in the code)


Here rcpw is the reciprocal of the viewport width. noFlips is the current frame number, a running count is kept. This is a simple arrangement. There are a few variables. The periodicity is one I haven't had the urge to try to mess with after having something that basically just works.

I'm not 100% positive that I've conceptualized the clip-space to pixel number in the HLSL shader correctly. There is virtually no documentation that I can find on the Internet that refers to this explicitly and I haven't felt like formulating experiments.


Ideally I'd like to patent this for myself and use proceeds that come from it being implemented as a hardware feature in both chips and displays to seed a foundation that will focus on a New Wave of video game like media that makes use of this technique/technology. I suggested making a "new games" initiative to Michael Samyn as an answer to his "not games" initiative which has run its course.


This technique changes a lot of assumptions about how video games work, and I foresee it splitting the history of video games into "old games" and "new games" and I think the future will look more like film and television, if only because it will be a brave new world free from jagged edges and multi hundred dollar systems and expansion cards.


Final note. The effect alone is quite convincing. But being primitive at this stage, I combine it with a basket of "free" AA effects, that create eye confusion, like dither. I find images appear artificial without these additional effects in general (with or without the revolutionary effect described here) and I'd be happy to elaborate on these addition effects in the comment section.

Please if you can, whoever you are, raise this to the top of Gamasutra so I can be praised for my dumb luck or pilloried.

I work on Sword of Moonlight (From Software) which I fully expect to be Minecraft 2.0 and change video games in a more deliberate way than this unexpected happy accident hopefully will. I very much dislike the way shadows are portrayed in video games, ever since stencil shadow volumes appeared and subsequent technologies emerged. I want to change shadows the same way I think I've changed edges forever.


NOTE TO EDITOR: By all means please edit any typos. I just want this to be a quick draft/published as is. I don't want to proofread it. Or give it another thought. Thank you.


Related Jobs

Bartlet Jones Supernatural Detective Agency Inc.
Bartlet Jones Supernatural Detective Agency Inc. — San Diego, California, United States
[11.24.17]

Senior Technical Artist
Pixel Pool
Pixel Pool — Portland, Oregon, United States
[11.24.17]

Software Engineer
Square Enix Co., Ltd.
Square Enix Co., Ltd. — Tokyo, Japan
[11.24.17]

Experienced Game Developer
Gear Inc.
Gear Inc. — Hanoi, Vietnam
[11.23.17]

[Viet Nam] Engineering Director





Loading Comments

loader image