From 77fe25a5a7b3bc42fd1dcf06be56cc48f11b4e6a Mon Sep 17 00:00:00 2001 From: Anthony Colle Date: Thu, 27 Aug 2020 12:39:23 +0100 Subject: [PATCH] Fixed wrong variable names in /appendix/04/ --- appendix/04/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appendix/04/README.md b/appendix/04/README.md index 5b0e1db..6821e7c 100644 --- a/appendix/04/README.md +++ b/appendix/04/README.md @@ -240,7 +240,7 @@ So not only can you retrieve a subset of your data, but you can also specify the vec4 color = vec4( 0.2, 0.8, 0.0, 1.0 ); //and retrieve the color components in the A,B,G,R order -vec4 backwards = v4.abgr; // backwards = vec4( 1.0, 0.0, 0.8, 0.2 ); +vec4 backwards = color.abgr; // backwards = vec4( 1.0, 0.0, 0.8, 0.2 ); ``` And of course, you can ask the same component multiple times: ```glsl @@ -248,7 +248,7 @@ And of course, you can ask the same component multiple times: vec4 color = vec4( 0.2, 0.8, 0.0, 1.0 ); //and retrieve a GAG vec3 based on the G & A channels of the color -vec3 GAG = v4.gag; // GAG = vec4( 0.8, 1.0, 0.8 ); +vec3 GAG = color.gag; // GAG = vec4( 0.8, 1.0, 0.8 ); ``` This is extremely handy to combine parts of vectors together, extract only the rgb channels of a RGBA color etc.