Notes from the KAYAC hyper-casual team
Tag: Shaders (5)

Compute Shaders on Low-Priced Smartphones
A simple benchmark that runs XorShift over every texel of a texture on the CPU and with a compute shader in Unity, measured on a low-priced Android phone and on high-end devices, with an explanation of the compute shader implementation and thoughts on when moving work to the GPU pays off.

Quietly Dangerous - On the Precision of Shader Variables
How floating-point precision works and why using half for UVs and positions in a shader causes bugs that appear only at high resolutions and only on some devices, with a few related pitfalls.

Height-Dependent Fog - Getting That "Gas Pooling in the Low Ground" Look
Building a fog that thins out with height in a Unity shader: from basic exponential fog, through a fog that ends at a fixed height, to a fog whose density falls off exponentially with height, derived by integration.

Changing the Perspective of CG with Shaders
A Unity post-process shader that turns ordinary perspective rendering into a fisheye-like azimuthal equidistant projection, so wide fields of view don't stretch the edges, with a vertex-shader speed-up and the problems that remain before it could ship.

[WebGL] Sprite Animation in 3D Space Using Shaders
How to play a sprite-sheet animation on a plane in a three.js 3D scene by scaling and translating the UV coordinates in the shader, first showing a single frame and then looping through all frames over time.