Quantcast
Channel: Aras' website
Viewing all 257 articles
Browse latest View live

Backporting Fixes and Shuffling Branches

$
0
0
“Everyday I’m Shufflin’” – LMFAO For past few months at work I’m operating this “graphics bugfixes” service. It’s a very simple, free (*) service that I’m doing to reduce overhead of doing “I have this tiny little fix there” changes. Aras-as-a-service, if you will. It works like explained in the image on the right. (*) Where’s the catch? It’s free, so I’ll get a million people to use it, and then it’s a raging success!

Solving DX9 Half-Pixel Offset

$
0
0
Summary: the Direct3D 9 “half pixel offset” problem that manages to annoy everyone can be solved in a single isolated place, robustly, and in a way where you don’t have to think about it ever again. Just add two instructions to all your vertex shaders, automatically.…here I am wondering if the target audience for D3D9 related blog post in 2016 is more than 7 people in the world. Eh, whatever!

Maldives Vacation Report 2016

$
0
0
Just spent 9 days in Maldives doing nothing! So here’s a writeup and a bunch of photos.“Magical”, “paradise”, “heaven” and other things, they say. So we decided to check it out for ourselves. Another factor was that after driving-heavy vacations in some previous years (e.g. USA or Iceland), the kids wanted to just do nothing for a bit. Sit in the water & snorkel, basically. So off we went, all four of us.

Adam Demo production talk at CGEvent

$
0
0
A while ago I delivered a talk at CG EVENT 2016 in Vilnius, about some production details of Unity’s Adam demo. Clarification point! I did nothing at all for the demo production, just did the talk pretending to be @__ReJ__. Also, there are more blog posts about the demo production on Unity blog, e.g. Adam - Production Design for Realtime Short Film by @_calader. All credit goes to the demo team, I only delivered the message :)

Hash Functions all the way down

$
0
0
Update! I tested more hash functions in a follow-up post. See More Hash Function Tests. A while ago I needed fast hash function for ~32 byte keys. We already had MurmurHash used in a bunch of places, so I started with that. But then I tried xxHash and that was a bit faster! So I dropped xxHash into the codebase, landed the thing to mainline and promptly left for vacation, with a mental note of “someday should look into other hash functions, or at least move them all under a single folder”.

More Hash Function Tests

$
0
0
In the previous post, I wrote about non-crypto hash functions, and did some performance tests. Turns out, it’s great to write about stuff! People at the comments/twitter/internets pointed out more things I should test. So here’s a follow-up post. What is not the focus This is about algorithms for “hashing some amount of bytes”, for use either in hashtables or for checksum / uniqueness detection. Depending on your situation, there’s a whole family of algorithms for that, and I am focusing on only one: non-cryptographic fast hash functions.

SPIR-V Compression

$
0
0
TL;DR: Vulkan SPIR-V shaders are fairly large. SMOL-V can make them smaller. Other folks are implementing Vulkan support at work, and the other day they noticed that Vulkan shaders (which are represented as SPIR-V binary format) take up quite a lot of space. I thought it would be a fun excercise to try to make them smoller, and maybe I’d learn something about compression along the way too. Caveat emptor!

Shader Compression: Some Data

$
0
0
One common question I had about SPIR-V Compression is “why compress shaders at all?“, coupled with question on how SPIR-V shaders compare with shader sizes on other platforms. Here’s some data (insert usual caveats: might be not representative, etc. etc.). Unity Standard shader, synthetic test Took Unity’s Standard shader, made some content to make it expand into 482 actual shader variants (some variants to handle different options in the UI, some to handle different lighting setups, lightmaps, shadows and whatnot etc.

Six Months in a Service Team

$
0
0
So it’s been six months since I switched to doing build engineering / developer tooling. Here are some random things I learned. It’s a service team We are working on a live codebase, with I don’t even know how many (~500?) developers on it, and it has to keep on building and not crumble down with additional code / people / stuff. This means the team I’m on is a “service / live ops” team to a large extent, does a bunch of support and short term problem solving, in addition to steering the whole codebase build towards a hopefully better future.

Non Power of Two Textures

$
0
0
Support for non power of two (“NPOT”, i.e. arbitrary sized) textures has been in GPUs for quite a while, but the state of support can be confusing. Recent question from @rygorous: Lazyweb, <…> GL question: <…> ARB NPOT textures is fairly demanding, and texture rectangle are awkward. Is there an equivalent to ES2-style semantics in regular GL? Bonus Q: Is there something like the Unity HW survey, but listing supported GL extensions?

Adventures in 3D Printing

$
0
0
I shamelessly stole whole idea from Robert Cupisz and did some 3D printed earrings. TL;DR: raymarching, marching cubes, MeshLab. Now for the longer version… Step 1: pick a Quaternion Julia fractal As always, Iñigo Quilez’ work is a definitive resource. There’s a ready-made GLSL shader for raymarching this fractal in ShaderToy (named “Quaternion”), however current state of WebGL doesn’t allow loops with dynamic number of iterations, so it does not quite work in the browser.

"Parallel for" in Apple's GCD

$
0
0
I was checking out OpenSubdiv and noticed that on a Mac it’s not exactly “massively parallel”. Neither of OpenGL backends work (transform feedback one requires GL 4.2, and compute shader one requires GL 4.3 - but Macs right now can only do GL 3.2), OpenCL backend is much slower than the CPU one (OS X 10.7, GeForce GT 330M) for some reason, I don’t have CUDA installed so didn’t check that one, and OpenMP isn’t exactly supported by Apple’s compilers (yet?

Mobile Hardware Stats (and more)

$
0
0
Short summary: Unity’s hardware stats page now has a “mobile” section. Which is exactly what it says, hardware statistics of people playing Unity games on iOS & Android. Go to stats.unity3d.com and enjoy. Some interesting bits: Operating systems iOS uptake is crazy high: 98% of the market has iOS version that’s not much older than one year (iOS 5.1 was released in 2012 March). You’d be quite okay targetting just 5.

Reviewing ALL THE CODE

$
0
0
I like to review ALL THE THINGS that are happening in our codebase. Currently we have about 70 programmers, mostly comitting to a single Mercurial repository (into a ton of different branches), producing about 120 commits per day. I used to review all that using RhodeCode’s “journal” page, but Lucas taught me a much better way. So here it is. Quick description of our current setup We use Mercurial for source control, with largefiles extension for versioning big binary files.

Iceland Vacation Report

$
0
0
tl;dr: Just spent a week in Iceland and it was awesome! Some folks have asked for impressions of my Iceland vacation or some advice, so here it goes. Caveats: my first (and only so far) trip there, we went with kids, came up with the itinerary ourselves (with some advice from friends), etc. Our trip was one week; myself, my wife and two kids (10 and 4yo). If you’re going alone, or for a honeymoon, or with a group of friends, the experience might be very different.

Inter-process Communication: How?

$
0
0
A post of mostly questions, and no answers! So I needed to do some IPC (Inter-process Communication) lately for shader compilers. There are several reasons why you’d want to move some piece of code into another process; in my case they were: Bit-ness of the process; I want a 64 bit main executable but some of our platforms have only 32 bit shader compiler libraries. Parallelism. For example you can call NVIDIA’s Cg from multiple threads, but it will just lock some internal mutex for most of the shader compilation time.

On having an ambitious vision

$
0
0
We just announced upcoming 2D tools for Unity 4.3, and one of responses I’ve seen is “I am rapidly running out of reasons not to use Unity”. Which reminds me of some stories of a few years back. Perhaps sometime in 2006, I was eating shawarmas with Joachim and discussing possible futures of Unity. His answer to my question, “so what’s your ultimate goal with Unity” was along the lines of,

Some Unity codebase stats

$
0
0
I was doing fresh codebase checkout & building on a new machine, so got some stats along the way. No big insights, move on! Codebase size We use Mercurial for source control right now. With “largefiles” extension for some big binary files (precompiled 3rd party libraries mostly). Getting only the “trunk” branch (without any other branches that aren’t in trunk yet), which is 97529 commits: Size of whole Mercurial history (.

Rough sorting by depth

$
0
0
TL;DR: use some highest bits from a float in your integer sorting key. In graphics, often you want to sort objects back-to-front (for transparency) or front-to-back (for occlusion efficiency) reasons. You also want to sort by a bunch of other data (global layer, material, etc.). Christer Ericson has a good post on exactly that. There’s a question in the comments: I have all the depth values in floats, and I want to use those values in the key.

Speaking at i3D and GDC 2014

$
0
0
I’ll be speaking at i3D Symposium and GDC in San Francisco in a couple of days. At i3D, Industry Panel (Sunday at 11:00AM). Jason Mitchell (Valve) will do a panel on the scalability challenges inherent in shipping games on a diverse range of platforms. Panelists are Michael Bukowski (Vicarious Visions), Jeremy Shopf (Firaxis), Emil Persson (Avalanche) and yours truly. My first i3D, can’t wait to see what it is about!
Viewing all 257 articles
Browse latest View live