mirror of
https://github.com/patriciogonzalezvivo/thebookofshaders
synced 2024-11-17 21:25:40 +00:00
Update vector glossary docs
This commit is contained in:
parent
f9d226cb03
commit
cd475abb37
@ -11,7 +11,7 @@ bvec2 dBvec2 = bvec2(aBvec3.x, aBvec3.y);
|
||||
```
|
||||
|
||||
### Description
|
||||
```bvec2``` is a boolean vectors with two components. Can be initialize by:
|
||||
```bvec2``` is a boolean vector with two components. It can be initialized by:
|
||||
|
||||
- Providing a scalar value for each component.
|
||||
- Providing one scalar value. This value is used for all components.
|
||||
|
@ -14,7 +14,7 @@ vec3 fBvec3 = bvec3(aBvec2.x, aBvec2.y, aBool);
|
||||
```
|
||||
|
||||
### Description
|
||||
```bvec3``` is a boolean vectors with three components. Can be initialize by:
|
||||
```bvec3``` is a boolean vector with three components. It can be initialized by:
|
||||
|
||||
- Providing a scalar value for each component.
|
||||
- Providing one scalar value. This value is used for all components.
|
||||
|
@ -11,7 +11,7 @@ vec4 dBvec4 = bvec4(aBvec2.x, aBvec2.y, aBool, aBvec3.x);
|
||||
```
|
||||
|
||||
### Description
|
||||
```bvec4``` is a boolean vectors with four components. Can be initialize by:
|
||||
```bvec4``` is a boolean vector with four components. It can be initialized by:
|
||||
|
||||
- Providing a scalar value for each component.
|
||||
- Providing one scalar value. This value is used for all components.
|
||||
|
@ -11,7 +11,7 @@ bvec2 dIvec2 = ivec2(aIvec3.x, aIvec3.y);
|
||||
```
|
||||
|
||||
### Description
|
||||
```ivec2``` is a integer vectors with two components. Can be initialize by:
|
||||
```ivec2``` is an integer vector with two components. It can be initialized by:
|
||||
|
||||
- Providing a scalar value for each component.
|
||||
- Providing one scalar value. This value is used for all components.
|
||||
|
@ -14,7 +14,7 @@ vec3 fIvec3 = ivec3(aIvec2.x, aIvec2.y, aInt);
|
||||
```
|
||||
|
||||
### Description
|
||||
```ivec3``` is a integer vectors with three components. Can be initialize by:
|
||||
```ivec3``` is an integer vector with three components. It can be initialized by:
|
||||
|
||||
- Providing a scalar value for each component.
|
||||
- Providing one scalar value. This value is used for all components.
|
||||
|
@ -11,7 +11,7 @@ vec4 dIvec4 = ivec4(aIvec2.x, aIvec2.y, aInt, aIvec3.x);
|
||||
```
|
||||
|
||||
### Description
|
||||
```ivec4``` is a integer vectors with four components. Can be initialize by:
|
||||
```ivec4``` is an integer vector with four components. It can be initialized by:
|
||||
|
||||
- Providing a scalar value for each component.
|
||||
- Providing one scalar value. This value is used for all components.
|
||||
|
@ -11,7 +11,7 @@ vec2 dVec2 = vec2(aVec3.x, aVec3.y);
|
||||
```
|
||||
|
||||
### Description
|
||||
```vec2``` is a float point vectors with two components. Can be initialize by:
|
||||
```vec2``` is a floating point vector with two components. It can be initialized by:
|
||||
|
||||
- Providing a scalar value for each component.
|
||||
- Providing one scalar value. This value is used for all components.
|
||||
|
@ -14,7 +14,7 @@ vec3 fVec3 = vec3(aVec2.x, aVec2.y, aFloat);
|
||||
```
|
||||
|
||||
### Description
|
||||
```bvec3``` is a floating point vectors with three components. Can be initialize by:
|
||||
```vec3``` is a floating point vector with three components. It can be initialized by:
|
||||
|
||||
- Providing a scalar value for each component.
|
||||
- Providing one scalar value. This value is used for all components.
|
||||
|
@ -3,15 +3,15 @@
|
||||
|
||||
### Declaration
|
||||
```glsl
|
||||
vec4 aBvec4 = bvec4(true, true, true, true);
|
||||
vec4 bBvec4 = bvec4(true);
|
||||
vec4 aVec4 = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
vec4 bVec4 = vec4(1.0);
|
||||
|
||||
vec4 cBvec4 = bvec4(aBvec2, aBool, aBvec3);
|
||||
vec4 dBvec4 = bvec4(aBvec2.x, aBvec2.y, aBool, aBvec3.x);
|
||||
vec4 cVec4 = vec4(aVec2, aFloat, aVec3);
|
||||
vec4 dVec4 = vec4(aBvec2.x, aBvec2.y, aFloat, aBvec3.x);
|
||||
```
|
||||
|
||||
### Description
|
||||
```bvec4``` is a floating point vectors with four components. Can be initialize by:
|
||||
```vec4``` is a floating point vector with four components. It can be initialized by:
|
||||
|
||||
- Providing a scalar value for each component.
|
||||
- Providing one scalar value. This value is used for all components.
|
||||
|
Loading…
Reference in New Issue
Block a user