<p>The texture is probably generated by picking a random angle per pixel, and populating the image with its sine and cosine, remapped into [0, 1]:</p>

<p>$$\theta \sim [0, 2\pi] \quad \to \quad \begin{bmatrix} \tfrac{1}{2} \cos \theta + \tfrac{1}{2} \\ \tfrac{1}{2} \sin \theta + \tfrac{1}{2} \\ 0 \end{bmatrix}$$</p>

<p>I did a quick test and generated something that looks pretty similar (enlarged 4x):</p>

<p><img src="https://i.sstatic.net/4ySjS.png" alt="enter image description here"></p>

<p>If you want to be extra fancy, then instead of picking independent random angles for every pixel, you might try stratified sampling or a low-discrepancy sequence. That may give better final results for whatever effect you're using the jitter texture for, due to better local sample distribution.</p>

CC BY-SA 3.0
2016-02-17T18:38:36.007Z
Thank you very much for your answer, could you tell me more about stratified sampling and low-discrepancy sequence ?
MaT
CC BY-SA 3.0
2016-10-05T11:15:57.443Z
For reference, here is the source for a low discrepancy sample (blue noise) generator https://github.com/bartwronski/BlueNoiseGenerator
Mikkel Gjoel
CC BY-SA 3.0
2016-02-17T08:11:53.453Z
2016-02-17T08:11:53.453Z
Nathan Reed
<p>I am currently reading the awesome paper by Jorge Jimenez about Character rendering : <a href="http://www.iryoku.com/stare-into-the-future" rel="noreferrer">Next Generation Character Rendering</a></p>

<p>In the part about multi-sampled transmittance he uses some Poisson offsets and a jitter texture which contains <em>[cos(x), sin(x)]</em> and is used to rotate the the Poisson disk samples.</p>

<p>But I am wondering how do you generate such texture ?</p>

<p>Here is the part of the ppt which talks about this.</p>

<p><a href="https://i.sstatic.net/21iCO.jpg" rel="noreferrer"><img src="https://i.sstatic.net/21iCO.jpg" alt="enter image description here"></a></p>

<opengl><rendering><texture><sampling><hlsl>
Jitter texture generation
MaT
# Jitter texture generation

(Asked by: username_0 on 2016-02-16)

I am currently reading the awesome paper by Jorge Jimenez about Character rendering : [Next Generation Character Rendering](http://www.iryoku.com/stare-into-the-future)

In the part about multi-sampled transmittance he uses some Poisson offsets and a jitter texture which contains *[cos(x), sin(x)]* and is used to rotate the the Poisson disk samples.

But I am wondering how do you generate such texture ?

Here is the part of the ppt which talks about this.

[![enter image description here](https://i.sstatic.net/21iCO.jpg)](https://i.sstatic.net/21iCO.jpg)

**Tags:** opengl, rendering, texture, sampling, hlsl


---

## 1 answers

### Answer by username_1 on 2016-02-17. Score: 5 | Accepted answer

The texture is probably generated by picking a random angle per pixel, and populating the image with its sine and cosine, remapped into [0, 1]:

$$\theta \sim [0, 2\pi] \quad \to \quad \begin{bmatrix} \tfrac{1}{2} \cos \theta + \tfrac{1}{2} \\ \tfrac{1}{2} \sin \theta + \tfrac{1}{2} \\ 0 \end{bmatrix}$$

I did a quick test and generated something that looks pretty similar (enlarged 4x):

![enter image description here](https://i.sstatic.net/4ySjS.png)

If you want to be extra fancy, then instead of picking independent random angles for every pixel, you might try stratified sampling or a low-discrepancy sequence. That may give better final results for whatever effect you're using the jitter texture for, due to better local sample distribution.

> **Comments:**
> **username_0**: Thank you very much for your answer, could you tell me more about stratified sampling and low-discrepancy sequence ?  
> **username_2**: For reference, here is the source for a low discrepancy sample (blue noise) generator https://github.com/bartwronski/BlueNoiseGenerator  

---

