Skip to content

Commit da1f179

Browse files
committed
fade
1 parent 2e93b97 commit da1f179

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

06_fade/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Fade
2+
3+
So we're on to a pretty basic example that uses a uniform. In this case we're
4+
using a single float value as a uniform to control the opacity of the triangle.
5+
In this case we can use the CPU to calculate what the fade should be based on
6+
the time as we increment the value. And on each frame before every draw call,
7+
we update the value of the uniform. The GPU will then remember that as a fixed
8+
value until we update it again, which happens to be on each frame.
9+
10+
As far as opacity goes, this example doesn't exactly work. I'm not sure why the
11+
example shows the console under the triangle each time. So I think there could
12+
be some setting that I'm missing when setting up the OpenGL context.

0 commit comments

Comments
 (0)