mirror of
https://github.com/patriciogonzalezvivo/thebookofshaders
synced 2024-11-09 19:10:24 +00:00
text updated for hello world to shaping function
This commit is contained in:
parent
d022ade59c
commit
7965cf142c
@ -1,19 +0,0 @@
|
||||
# Gallery - Getting started
|
||||
|
||||
## Examples
|
||||
|
||||
Some blurb about what the chapter is about. Bacon ipsum dolor amet ham hock tongue picanha pancetta kevin sausage. Meatloaf biltong cupim pork loin ham turducken shoulder t-bone bacon capicola pancetta pork kielbasa. Meatball kevin bresaola beef ribs, meatloaf ribeye drumstick turkey. Cow pig ham picanha corned beef leberkas filet mignon landjaeger ribeye pork capicola short ribs doner.
|
||||
|
||||
Read [getting started](../00/)
|
||||
|
||||
<div id="c00-examples"></div>
|
||||
<script type="text/javascript">gallery.createExampleList("c00")</script>
|
||||
|
||||
<!---
|
||||
## Shared Shaders
|
||||
|
||||
Let's look at what your fellow learners are doing. Bellow are the shaders shared for this chapter by the readers of this book.
|
||||
|
||||
<div id="c00-shared-examples"></div>
|
||||
<script type="text/javascript">gallery.createExampleList("c00-shared")</script>
|
||||
--->
|
@ -2,9 +2,9 @@
|
||||
|
||||
## Examples
|
||||
|
||||
Some blurb about what the chapter is about. Bacon ipsum dolor amet ham hock tongue picanha pancetta kevin sausage. Meatloaf biltong cupim pork loin ham turducken shoulder t-bone bacon capicola pancetta pork kielbasa. Meatball kevin bresaola beef ribs, meatloaf ribeye drumstick turkey. Cow pig ham picanha corned beef leberkas filet mignon landjaeger ribeye pork capicola short ribs doner.
|
||||
Shaping functions is fundamental technique that is recursively used throughout this book that let you control the variation of the value at will. Study how different functions of x are used to create different shapes and try making your own function.
|
||||
|
||||
Read the chapter [Shaping funcions](../05/)
|
||||
Read [Shaping functions](../05) to learn more.
|
||||
|
||||
<div id="c05-examples"></div>
|
||||
<script type="text/javascript">gallery.createExampleList("c05")</script>
|
||||
|
@ -4,7 +4,7 @@ The following is the list of examples present in this book and more from our exc
|
||||
|
||||
## Featured shaders
|
||||
|
||||
Featured examples from the shaders shared by our readers and students.
|
||||
Featured examples shared by our readers and students. We are looking forward to see a lot more shaders created with the [GLSL editor](http://editor.thebookofshaders.com/). Please share your masterpiecess to [@bookofshaders](https://twitter.com/bookofshaders).
|
||||
|
||||
<div id="shared-examples"></div>
|
||||
<script type="text/javascript">gallery.createExampleList("shared", 9)</script>
|
||||
@ -15,7 +15,9 @@ Featured examples from the shaders shared by our readers and students.
|
||||
## Getting started
|
||||
### "Hello World!"
|
||||
|
||||
Some blurb about what the chapter is about. Bacon ipsum dolor amet ham hock tongue picanha pancetta kevin sausage. Meatloaf biltong cupim pork loin ham turducken shoulder t-bone bacon capicola pancetta pork kielbasa. Meatball kevin bresaola beef ribs, meatloaf ribeye drumstick turkey. Cow pig ham picanha corned beef leberkas filet mignon landjaeger ribeye pork capicola short ribs doner.
|
||||
Usually the "Hello world!" example is the first step to learning a new language. In GPU-land rendering text is an overcomplicated task for a first step, instead we'll choose a bright welcoming color to shout our enthusiasm!
|
||||
|
||||
Read ["Hello World!"](../02) to learn more.
|
||||
|
||||
<div id="c02-examples"></div>
|
||||
<script type="text/javascript">gallery.createExampleList("c02", 3)</script>
|
||||
@ -23,7 +25,15 @@ Some blurb about what the chapter is about. Bacon ipsum dolor amet ham hock tong
|
||||
|
||||
### Uniforms
|
||||
|
||||
Some blurb about what the chapter is about. Bacon ipsum dolor amet ham hock tongue picanha pancetta kevin sausage. Meatloaf biltong cupim pork loin ham turducken shoulder t-bone bacon capicola pancetta pork kielbasa. Meatball kevin bresaola beef ribs, meatloaf ribeye drumstick turkey. Cow pig ham picanha corned beef leberkas filet mignon landjaeger ribeye pork capicola short ribs doner.
|
||||
Learn how to use Uniform variables. Uniform variables, or simply *uniforms* are the variables that carry information equally accessible from all of the threads of your shader. The [GSLS editor](http://editor.thebookofshaders.com/) has three uniforms set up for you.
|
||||
|
||||
Read [Uniforms](../03) to learn more.
|
||||
|
||||
```glsl
|
||||
uniform vec2 u_resolution; // Canvas size (width,height)
|
||||
uniform vec2 u_mouse; // mouse position in screen pixels
|
||||
uniform float u_time; // Time in seconds since load
|
||||
```
|
||||
|
||||
<div id="c03-examples"></div>
|
||||
<script type="text/javascript">gallery.createExampleList("c03", 3)</script>
|
||||
@ -31,7 +41,9 @@ Some blurb about what the chapter is about. Bacon ipsum dolor amet ham hock tong
|
||||
## Algorithmic drawing
|
||||
### Shaping functions
|
||||
|
||||
Some blurb about what the chapter is about. Bacon ipsum dolor amet ham hock tongue picanha pancetta kevin sausage. Meatloaf biltong cupim pork loin ham turducken shoulder t-bone bacon capicola pancetta pork kielbasa. Meatball kevin bresaola beef ribs, meatloaf ribeye drumstick turkey. Cow pig ham picanha corned beef leberkas filet mignon landjaeger ribeye pork capicola short ribs doner.
|
||||
Shaping functions is fundamental technique that is recursively used throughout this book that let you control the variation of the value at will. Study how different functions of x are used to create different shapes and try making your own function.
|
||||
|
||||
Read [Shaping functions](../05) to learn more.
|
||||
|
||||
<div id="c05-examples"></div>
|
||||
<script type="text/javascript">gallery.createExampleList("c05", 3)</script>
|
||||
|
@ -3,6 +3,7 @@ echo '
|
||||
<footer>
|
||||
<p> Copyright 2015 <a href="http://www.patriciogonzalezvivo.com" target="_blank">Patricio Gonzalez Vivo</a> </p>
|
||||
</footer>
|
||||
<script type="text/javascript" src="'.$path.'/src/main.js" defer></script>
|
||||
|
||||
<script> (function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
|
@ -21,8 +21,8 @@ var gallery = function() {
|
||||
var li = $("<li>");
|
||||
var a = $("<a>").attr("href", d.url.replace("../", "http://www.thebookofshaders.com/"));
|
||||
var container = $("<div>").attr("class", "imgcontainer")
|
||||
.append($("<img>").attr({"src": d.src, "alt": d.caption}))
|
||||
.append($("<div>").attr("class", "caption").text(d.caption));
|
||||
.append($("<img>").attr({"src": d.src, "alt": d.caption}));
|
||||
//.append($("<div>").attr("class", "caption").text(d.caption));
|
||||
li.append(a);
|
||||
a.append(container);
|
||||
return li;
|
||||
|
@ -10,14 +10,14 @@ examples.c05 = [
|
||||
{url:"../edit.html#05/cubicpulse.frag", src: "http://www.thebookofshaders.com/log/160319051235.png", caption: "Iñigo Quiles\'s Cubic Pulse"},
|
||||
{url:"../edit.html#05/expstep.frag", src: "http://www.thebookofshaders.com/log/160319051258.png", caption: "Iñigo Quiles\'s Exponential Step"},
|
||||
{url:"../edit.html#05/expstep.frag", src: "http://www.thebookofshaders.com/log/160319051312.png", caption: "Iñigo Quiles\'s Parabola"},
|
||||
{url:"../edit.html#05/parabola.frag", src: "http://www.thebookofshaders.com/log/preview.png", caption: "Iñigo Quiles\'s Power Curve"},
|
||||
{url:"../edit.html#05/expstep.frag", src: "http://www.thebookofshaders.com/log/preview.png", caption: "Iñigo Quiles\'s Parabola"},
|
||||
{url:"../edit.html#05/pcurve.frag", src: "http://www.thebookofshaders.com/log/preview.png", caption: "Iñigo Quiles\'s Power Curve"},
|
||||
{url:"../edit.html#05/easing.frag", src: "http://www.thebookofshaders.com/log/preview.png", caption: "Easing functions"},
|
||||
{url:"../edit.html#examples/05/stepwise.frag", src: "http://www.thebookofshaders.com/log/preview.png", caption: "Stepwise function"},
|
||||
{url:"../edit.html?log=160208105810", src: "http://www.thebookofshaders.com/log/preview.png", caption: "kynd\'s quadratic bezier"},
|
||||
{url:"../edit.html?log=160208105716", src: "http://www.thebookofshaders.com/log/preview.png", caption: "kynd\'s cubic bezier (1)"},
|
||||
{url:"../edit.html?log=160208105702", src: "http://www.thebookofshaders.com/log/preview.png", caption: "kynd\'s cubic bezier (2)"}
|
||||
{url:"../edit.html#05/parabola.frag", src: "http://www.thebookofshaders.com/log/160320210250.png", caption: "Iñigo Quiles\'s Power Curve"},
|
||||
{url:"../edit.html#05/expstep.frag", src: "http://www.thebookofshaders.com/log/160320210318.png", caption: "Iñigo Quiles\'s Parabola"},
|
||||
{url:"../edit.html#05/pcurve.frag", src: "http://www.thebookofshaders.com/log/160320210337.png", caption: "Iñigo Quiles\'s Power Curve"},
|
||||
{url:"../edit.html#05/easing.frag", src: "http://www.thebookofshaders.com/log/160320210456.png", caption: "Easing functions"},
|
||||
{url:"../edit.html#examples/05/stepwise.frag", src: "http://www.thebookofshaders.com/log/160320210519.png", caption: "Stepwise function"},
|
||||
{url:"../edit.html?log=160208105810", src: "http://www.thebookofshaders.com/log/160320210550.png", caption: "kynd\'s quadratic bezier"},
|
||||
{url:"../edit.html?log=160208105716", src: "http://www.thebookofshaders.com/log/160320210609.png", caption: "kynd\'s cubic bezier (1)"},
|
||||
{url:"../edit.html?log=160208105702", src: "http://www.thebookofshaders.com/log/160320210634.png", caption: "kynd\'s cubic bezier (2)"}
|
||||
];
|
||||
|
||||
examples["c05-shared"] = [
|
||||
|
Loading…
Reference in New Issue
Block a user