Recompile docs
Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
parent
a53621648c
commit
e63b55ee20
27 changed files with 302 additions and 293 deletions
|
|
@ -3,8 +3,8 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>SDF-2D - v0.7.4</title>
|
||||
<meta name="description" content="Documentation for SDF-2D - v0.7.4">
|
||||
<title>SDF-2D - v0.7.5</title>
|
||||
<meta name="description" content="Documentation for SDF-2D - v0.7.5">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="assets/css/main.css">
|
||||
<link rel="icon" href="favicon.ico" />
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="index.html" class="title">SDF-2D - v0.7.4</a>
|
||||
<a href="index.html" class="title">SDF-2D - v0.7.5</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<a href="globals.html">Globals</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>SDF-2D - v0.7.4</h1>
|
||||
<h1>SDF-2D - v0.7.5</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -119,7 +119,8 @@
|
|||
</a>
|
||||
<p>For optimising the evaluation of the distance field, the display is divided up into a grid of tiles. The shaders for each tile are compiled to support a fix maximum number of objects on it. When using the built-in drawables it is possible that after a certain number of on-screen objects new ones won't be visible.</p>
|
||||
<p>Mitigating this issue is quite easy. Instead of the following code:</p>
|
||||
<pre><code class="language-js"><span class="hljs-built_in">this</span>.renderer = <span class="hljs-keyword">await</span> compile(canvas, [Circle.descriptor, CircleLight.descriptor]);</code></pre>
|
||||
<pre><code class="language-js"><span class="hljs-built_in">this</span>.renderer = <span class="hljs-keyword">await</span> compile(canvas, [Circle.descriptor, CircleLight.descriptor]);
|
||||
</code></pre>
|
||||
<p>Modify it to something similar:</p>
|
||||
<pre><code class="language-js"><span class="hljs-built_in">this</span>.renderer = <span class="hljs-keyword">await</span> compile(canvas, [
|
||||
{
|
||||
|
|
@ -130,7 +131,8 @@
|
|||
...CircleLight.descriptor,
|
||||
<span class="hljs-attr">shaderCombinationSteps</span>: [<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">4</span>],
|
||||
},
|
||||
]);</code></pre>
|
||||
]);
|
||||
</code></pre>
|
||||
<p>The usage of too large numbers is not advised for compatibility and performance reasons alike.</p>
|
||||
<blockquote>
|
||||
<p>Steps are very useful for tile-based rendering, because it is possible for one tile (at a given moment) to be empty or contain just a few objects, while others have a large cluster of objects. The compiled shaders only take into account the necessary number of objects on each tile.</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue