Skip to content

Commit

Permalink
Translate the glossary section
Browse files Browse the repository at this point in the history
  • Loading branch information
DancingPhoenix88 committed Jul 30, 2020
1 parent 120d047 commit 39a611c
Show file tree
Hide file tree
Showing 50 changed files with 215 additions and 227 deletions.
2 changes: 1 addition & 1 deletion glossary/atan/README-vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ vec4 atan(vec4 y_over_x)
Ở phiên bản thứ hai, ```atan()``` trả về góc lượng giác (đơn vị radian) ứng với tan bằng ```y_over_x```. Kết quả trả về trong trường hợp này sẽ nằm trong khoảng [-PI/2, PI/2].

### Tham khảo thêm
[cos](/glossary/?lan=vi&search=cos), [acos](/glossary/?lan=vi&search=acos), [sin](/glossary/?lan=vi&search=sin), [asin](/glossary/?lan=vi&search=asin), [atan](/glossary/?lan=vi&search=atan), [Các hàm số cơ bản (Hàm hình dạng - Shape function)](/05/?lan=vi), [Chapter 06: Color](/06/)
[cos](/glossary/?lan=vi&search=cos), [acos](/glossary/?lan=vi&search=acos), [sin](/glossary/?lan=vi&search=sin), [asin](/glossary/?lan=vi&search=asin), [atan](/glossary/?lan=vi&search=atan), [Các hàm số cơ bản (Hàm hình dạng - Shape function)](/05/?lan=vi), [Chương 6: Màu sắc](/06/?lan=vi)
4 changes: 2 additions & 2 deletions glossary/distance/README-vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ float distance(vec4 p0, vec4 p1)
```

### Các tham số
```p0``` Điểm đầu tiên
```p0``` Điểm thứ nhất

```p1``` Điểm thứ hai

Expand All @@ -21,4 +21,4 @@ float distance(vec4 p0, vec4 p1)

### Tham khảo thêm

[length()](/glossary/?lan=vi&search=length), [normalize()](/glossary/?lan=vi&search=normalize), [Chapter 07: Shapes](/07/)
[length()](/glossary/?lan=vi&search=length), [normalize()](/glossary/?lan=vi&search=normalize), [Chương 7: Hình dạng](/07/?lan=vi)
8 changes: 4 additions & 4 deletions glossary/equal/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Equal
Perform a component-wise equal-to comparison of two vectors
Thực hiện phép so sánh bằng giữa các cặp giá trị của 2 vector.

### Các phiên bản
```glsl
Expand All @@ -13,12 +13,12 @@ bvec4 equal(ivec4 x, ivec4 y)
```

### Các tham số
```x``` Specifies the first vector to be used in the comparison operation.
```x``` Vector thứ nhất.

```y``` Specifies the second vector to be used in the comparison operation.
```y``` Vector thứ hai.

### Mô tả
```equal()``` returns a boolean vector in which each element ```i``` is computed as ```x[i] == y[i]```.
```equal()``` trả về một vector boolean mà thành phần thứ ```i``` là kết quả của phép so sánh ```x[i] == y[i]```.

### Tham khảo thêm
[lessThanEqual()](/glossary/?lan=vi&search=lessThanEqual), [lessThan()](/glossary/?lan=vi&search=lessThan), [greaterThanEqual()](/glossary/?lan=vi&search=greaterThanEqual), [greaterThan()](/glossary/?lan=vi&search=greaterThan), [notEqual()](/glossary/?lan=vi&search=notEqual), [any()](/glossary/?lan=vi&search=any), [all()](/glossary/?lan=vi&search=all), [not()](/glossary/?lan=vi&search=not)
6 changes: 3 additions & 3 deletions glossary/exp/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Exp
Return the natural exponentiation of the parameter
Tính lũy thừa tự nhiên của một số

### Các phiên bản
```glsl
Expand All @@ -10,10 +10,10 @@ vec4 exp(vec4 x)
```

### Các tham số
```x``` specify the value to exponentiate.
```x``` số cần tính lũy thừa tự nhiên.

### Mô tả
```exp()``` returns the natural exponentiation of ```x```.
```exp()``` trả về kết quả của phép tính e mũ ```x``` (e là cơ số của logarith tự nhiên, xấp xỉ 2.71828)

<div class="simpleFunction" data="y = exp(x); "></div>

Expand Down
6 changes: 3 additions & 3 deletions glossary/exp2/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Exp2
Return 2 raised to the power of the parameter
Hàm 2 mũ x.

### Các phiên bản
```glsl
Expand All @@ -10,10 +10,10 @@ vec4 exp2(vec4 x)
```

### Các tham số
```x``` specify the value of the power to which 2 will be raised.
```x``` số mũ.

### Mô tả
```exp2()``` returns 2 raised to the power of ```x```.
```exp2()``` trả về kết quả của phép tính 2 mũ ```x```.

<div class="simpleFunction" data="y = exp2(x); "></div>

Expand Down
10 changes: 5 additions & 5 deletions glossary/faceforward/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Faceforward
Return a vector pointing in the same direction as another
Tìm vector pháp tuyến cùng phía với vector tới so với một bề mặt.

### Các phiên bản
```glsl
Expand All @@ -10,14 +10,14 @@ vec4 faceforward(vec4 N, vec4 I, vec4 Nref)
```

### Các tham số
```N``` specifies the vector to orient.
```N``` vector pháp tuyến của bề mặt sẽ va chạm (hướng trả về sẽ trùng hướng này hoặc hướng ngược lại)

```I``` specifies the incident vector.
```I``` vector tới (hướng tới vị trí va chạm với bề mặt).

```Nref``` specifies the reference vector.
```Nref``` vector pháp tuyến của bề mặt cần kiểm tra.

### Mô tả
```faceforward()``` orients a vector to point away from a surface as defined by its normal. ```If dot(Nref, I) < 0``` faceforward returns ```N```, otherwise it returns ```-N```.
```faceforward()``` trả về hướng của bề mặt (vector pháp tuyến) tại vị trí va chạm với tia tới. Nếu ```dot(Nref, I) < 0``` trả về ```N```, ngược lại trả về ```-N```.

### Tham khảo thêm
[reflect()](/glossary/?lan=vi&search=reflect), [refract()](/glossary/?lan=vi&search=refract)
4 changes: 2 additions & 2 deletions glossary/float/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Float
Floating-point variable type
Kiểu dữ liệu số thực.

### Các phiên bản
```glsl
Expand All @@ -9,7 +9,7 @@ float cFloat = float(aInt);
```

### Mô tả
```float``` is used for floating point values.
```float``` lưu giá trị của số thực, bao gồm cả phần nguyên lẫn phần thập phân.

### Tham khảo thêm
[void](/glossary/?lan=vi&search=void), [bool](/glossary/?lan=vi&search=bool), [int](/glossary/?lan=vi&search=int), [float](/glossary/?lan=vi&search=float), [bvec2](/glossary/?lan=vi&search=bvec2), [bvec3](/glossary/?lan=vi&search=bvec3), [bvec4](/glossary/?lan=vi&search=bvec4), [struct](/glossary/?lan=vi&search=struct)
6 changes: 3 additions & 3 deletions glossary/floor/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Floor
Find the nearest integer less than or equal to the parameter
Tìm số nguyên gần nhất nhỏ hơn hoặc bằng (Làm tròn xuống).

### Các phiên bản
```glsl
Expand All @@ -10,10 +10,10 @@ vec4 floor(vec4 x)
```

### Các tham số
```x``` specify the value to evaluate.
```x``` số cần làm tròn xuống

### Mô tả
```floor()``` returns a value equal to the nearest integer that is less than or equal to ```x```.
```floor()``` trả về số nguyên gần nhất nhỏ hơn hoặc bằng với ```x```.

<div class="simpleFunction" data="y = floor(x); "></div>

Expand Down
6 changes: 3 additions & 3 deletions glossary/fract/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Fract
Compute the fractional part of the argument
Tách phần thập phân của số thực.

### Các phiên bản
```glsl
Expand All @@ -10,10 +10,10 @@ vec4 fract(vec4 x)
```

### Các tham số
```x``` specify the value to evaluate.
```x``` số thực cần tách phần thập phân.

### Mô tả
```fract()``` returns the fractional part of ```x```. This is calculated as ```x - floor(x)```.
```fract()``` trả về phần thập phân của ```x``` theo công thức ```x - floor(x)```.

<div class="simpleFunction" data="y = fract(x); "></div>

Expand Down
8 changes: 4 additions & 4 deletions glossary/greaterThan/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## GreaterThan
Perform a component-wise greater-than comparison of two vectors
Thực hiện phép so sánh lớn hơn với từng cặp giá trị trong 2 vector

### Các phiên bản
```glsl
Expand All @@ -13,12 +13,12 @@ bvec4 greaterThan(ivec4 x, ivec4 y)
```

### Các tham số
```x``` specifies the first vector to be used in the comparison operation.
```x``` Vector thứ nhất

```y``` specifies the second vector to be used in the comparison operation.
```y``` Vector thứ hai

### Mô tả
```greaterThan()``` returns a boolean vector in which each element ```i``` is computed as ```x[i] > y[i]```.
```greaterThan()``` trả về một vector boolean mà thành phần thứ ```i``` là kết quả của phép so sánh ```x[i] > y[i]```.

### Tham khảo thêm
[lessThanEqual()](/glossary/?lan=vi&search=lessThanEqual), [lessThan()](/glossary/?lan=vi&search=lessThan), [greaterThanEqual()](/glossary/?lan=vi&search=greaterThanEqual), [equal()](/glossary/?lan=vi&search=equal), [notEqual()](/glossary/?lan=vi&search=notEqual), [any()](/glossary/?lan=vi&search=any), [all()](/glossary/?lan=vi&search=all), [not()](/glossary/?lan=vi&search=not)
8 changes: 4 additions & 4 deletions glossary/greaterThanEqual/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## GreaterThanEqual
Perform a component-wise greater-than-or-equal comparison of two vectors
Thực hiện phép so sánh lớn-hơn-hoặc-bằng cho từng cặp giá trị giữa hai vector.

### Các phiên bản
```glsl
Expand All @@ -13,12 +13,12 @@ bvec4 greaterThanEqual(ivec4 x, ivec4 y)
```

### Các tham số
```x``` specifies the first vector to be used in the comparison operation.
```x``` Vector thứ nhất.

```y``` specifies the second vector to be used in the comparison operation.
```y``` Vector thứ hai.

### Mô tả
```greaterThanEqual()``` returns a boolean vector in which each element ```i``` is computed as ```x[i] ≥ y[i]```.
```greaterThanEqual()``` trả về một vector boolean mà thành phần thứ ```i``` là kết quả của phép so sánh ```x[i] ≥ y[i]```.

### Tham khảo thêm
[lessThanEqual()](/glossary/?lan=vi&search=lessThanEqual), [lessThan()](/glossary/?lan=vi&search=lessThan), [greaterThan()](/glossary/?lan=vi&search=greaterThan), [equal()](/glossary/?lan=vi&search=equal), [notEqual()](/glossary/?lan=vi&search=notEqual), [any()](/glossary/?lan=vi&search=any), [all()](/glossary/?lan=vi&search=all), [not()](/glossary/?lan=vi&search=not)
4 changes: 2 additions & 2 deletions glossary/int/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Int
Integer data type
Kiểu dữ liệu số nguyên.

### Các phiên bản
```glsl
Expand All @@ -9,7 +9,7 @@ int cInt = int(aFloat);
```

### Mô tả
```int``` is used for integer values.
```int``` lưu giá trị của một số nguyên.

### Tham khảo thêm
[void](/glossary/?lan=vi&search=void), [bool](/glossary/?lan=vi&search=bool), [int](/glossary/?lan=vi&search=int), [float](/glossary/?lan=vi&search=float), [ivec2](/glossary/?lan=vi&search=ivec2), [ivec3](/glossary/?lan=vi&search=ivec3), [ivec4](/glossary/?lan=vi&search=ivec4)
6 changes: 3 additions & 3 deletions glossary/inversesqrt/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Inversesqrt
Return the inverse of the square root of the parameter
Phép nghịch đảo căn bậc 2.

### Các phiên bản
```glsl
Expand All @@ -10,10 +10,10 @@ vec4 inversesqrt(vec4 x)
```

### Các tham số
```x``` specify the value of which to take the inverse of the square root.
```x``` số cần tính nghịch đảo căn bậc 2.

### Mô tả
```inversesqrt()``` returns the inverse of the square root of ```x```.
```inversesqrt()``` trả về kết quả của biểu thức ```1 / sqrt(x)```.

<div class="simpleFunction" data="y = inversesqrt(x); "></div>

Expand Down
11 changes: 5 additions & 6 deletions glossary/ivec2/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Ivec2
2 dimensional integer vector
Vector số nguyên 2 chiều.

### Các phiên bản
```glsl
Expand All @@ -11,11 +11,10 @@ bvec2 dIvec2 = ivec2(aIvec3.x, aIvec3.y);
```

### Mô tả
```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.
- Providing a vector of higher dimension. The respective values are used to initialize the components.
```ivec2``` vector số nguyên gồm 2 thành phần. Nó có thể được khởi tạo bằng các cách:
- Chỉ định giá trị của từng thành phần
- Chỉ định 1 giá trị chung cho cả 2 thành phần
- Lấy giá trị từ 1 vector nhiều chiều hơn. Các thành phần sẽ được khởi tạo theo thứ tự.

### Tham khảo thêm
[bool](/glossary/?lan=vi&search=bool), [int](/glossary/?lan=vi&search=int), [float](/glossary/?lan=vi&search=float), [bvec2](/glossary/?lan=vi&search=bvec2), [bvec3](/glossary/?lan=vi&search=bvec3), [bvec4](/glossary/?lan=vi&search=bvec4), [ivec2](/glossary/?lan=vi&search=ivec2), [ivec3](/glossary/?lan=vi&search=ivec3), [ivec4](/glossary/?lan=vi&search=ivec4), [vec2](/glossary/?lan=vi&search=vec2), [vec3](/glossary/?lan=vi&search=vec3), [vec4](/glossary/?lan=vi&search=vec4), [mat2](/glossary/?lan=vi&search=mat2), [mat3](/glossary/?lan=vi&search=mat3), [mat4](/glossary/?lan=vi&search=mat4)
13 changes: 6 additions & 7 deletions glossary/ivec3/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Ivec3
3 dimensional integer vector
Vector số nguyên 3 chiều.

### Các phiên bản
```glsl
Expand All @@ -14,12 +14,11 @@ vec3 fIvec3 = ivec3(aIvec2.x, aIvec2.y, aInt);
```

### Mô tả
```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.
- Providing a vector of higher dimension. The respective values are used to initialize the components.
- Providing a combination of vectors and/or scalars. The respective values are used to initialize the vector. The arguments of the constructor must have at least as many components as the vector that is initialized.
```ivec3``` vector số nguyên gồm 3 thành phần. Nó có thể được khởi tạo bằng các cách:
- Chỉ định giá trị của từng thành phần
- Chỉ định 1 giá trị chung cho cả 3 thành phần
- Lấy giá trị từ 1 vector nhiều chiều hơn. Các thành phần sẽ được khởi tạo theo thứ tự.
- Lấy giá trị theo thứ tự lần lượt từ nhiều vector, miễn là đủ 3 thành phần.

### Tham khảo thêm
[bool](/glossary/?lan=vi&search=bool), [int](/glossary/?lan=vi&search=int), [float](/glossary/?lan=vi&search=float), [bvec2](/glossary/?lan=vi&search=bvec2), [bvec3](/glossary/?lan=vi&search=bvec3), [bvec4](/glossary/?lan=vi&search=bvec4), [ivec2](/glossary/?lan=vi&search=ivec2), [ivec3](/glossary/?lan=vi&search=ivec3), [ivec4](/glossary/?lan=vi&search=ivec4), [vec2](/glossary/?lan=vi&search=vec2), [vec3](/glossary/?lan=vi&search=vec3), [vec4](/glossary/?lan=vi&search=vec4), [mat2](/glossary/?lan=vi&search=mat2), [mat3](/glossary/?lan=vi&search=mat3), [mat4](/glossary/?lan=vi&search=mat4)
10 changes: 5 additions & 5 deletions glossary/ivec4/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Ivec4
4 dimensional integer vector
Vector số nguyên 4 chiều

### Các phiên bản
```glsl
Expand All @@ -11,11 +11,11 @@ vec4 dIvec4 = ivec4(aIvec2.x, aIvec2.y, aInt, aIvec3.x);
```

### Mô tả
```ivec4``` is an integer vector with four components. It can be initialized by:
```ivec4``` là một vector số nguyên gồm 4 thành phần. Nó có thể được khởi tạo bằng các cách:

- Providing a scalar value for each component.
- Providing one scalar value. This value is used for all components.
- Providing a combination of vectors and/or scalars. The respective values are used to initialize the vector. The arguments of the constructor must have at least as many components as the vector that is initialized.
- Chỉ định giá trị của từng thành phần
- Chỉ định 1 giá trị chung cho cả 4 thành phần
- Lấy giá trị theo thứ tự lần lượt từ nhiều vector, miễn là đủ 4 thành phần.

### Tham khảo thêm
[bool](/glossary/?lan=vi&search=bool), [int](/glossary/?lan=vi&search=int), [float](/glossary/?lan=vi&search=float), [bvec2](/glossary/?lan=vi&search=bvec2), [bvec3](/glossary/?lan=vi&search=bvec3), [bvec4](/glossary/?lan=vi&search=bvec4), [ivec2](/glossary/?lan=vi&search=ivec2), [ivec3](/glossary/?lan=vi&search=ivec3), [ivec4](/glossary/?lan=vi&search=ivec4), [vec2](/glossary/?lan=vi&search=vec2), [vec3](/glossary/?lan=vi&search=vec3), [vec4](/glossary/?lan=vi&search=vec4), [mat2](/glossary/?lan=vi&search=mat2), [mat3](/glossary/?lan=vi&search=mat3), [mat4](/glossary/?lan=vi&search=mat4)
8 changes: 4 additions & 4 deletions glossary/length/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Length
Calculate the length of a vector
Tính độ dài cuuar vector.

### Các phiên bản
```glsl
Expand All @@ -10,13 +10,13 @@ float length(vec4 x)
```

### Các tham số
```x``` specifies a vector of which to calculate the length.
```x``` vector cần tính độ dài

### Mô tả
```length()``` returns the length of the vector.
```length()``` trả về độ dài của vector.

<div class="codeAndCanvas" data="../07/circle-making.frag"></div>

### Tham khảo thêm

[distance()](/glossary/?lan=vi&search=distance), [normalize()](/glossary/?lan=vi&search=normalize), [Chapter 07: Shapes](/07/)
[distance()](/glossary/?lan=vi&search=distance), [normalize()](/glossary/?lan=vi&search=normalize), [Chương 07: Hình dạng](/07/?lan=vi)
8 changes: 4 additions & 4 deletions glossary/lessThan/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## LessThan
Perform a component-wise less-than comparison of two vectors
Thực hiện phép so sánh nhỏ-hơn giữa các cặp giá trị của 2 vector.

### Các phiên bản
```glsl
Expand All @@ -13,12 +13,12 @@ bvec4 lessThan(ivec4 x, ivec4 y)
```

### Các tham số
```x``` specifies the first vector to be used in the comparison operation.
```x``` Vector thứ nhất.

```y``` specifies the second vector to be used in the comparison operation.
```y``` Vector thứ hai.

### Mô tả
```lessThan()``` returns a boolean vector in which each element ```i``` is computed as ```x[i] < y[i]```.
```lessThan()``` trả về một vector boolean mà thành phần thứ ```i``` là kết quả của phép so sánh ```x[i] < y[i]```.

### Tham khảo thêm
[lessThanEqual()](/glossary/?lan=vi&search=lessThanEqual), [greaterThan()](/glossary/?lan=vi&search=greaterThan), [greaterThanEqual()](/glossary/?lan=vi&search=greaterThanEqual), [equal()](/glossary/?lan=vi&search=equal), [notEqual()](/glossary/?lan=vi&search=notEqual), [any()](/glossary/?lan=vi&search=any), [all()](/glossary/?lan=vi&search=all), [not()](/glossary/?lan=vi&search=not)
8 changes: 4 additions & 4 deletions glossary/lessThanEqual/README-vi.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## LessThanEqual
Perform a component-wise less-than-or-equal comparison of two vectors
Thực hiện phép so sánh nhỏ-hơn-hoặc-bằng giữa các cặp giá trị của 2 vector.

### Các phiên bản
```glsl
Expand All @@ -13,12 +13,12 @@ bvec4 lessThanEqual(ivec4 x, ivec4 y)
```

### Các tham số
```x``` specifies the first vector to be used in the comparison operation.
```x``` Vector thứ nhất.

```y``` specifies the second vector to be used in the comparison operation.
```y``` Vector thứ hai.

### Mô tả
```lessThanEqual()``` returns a boolean vector in which each element ```i``` is computed as ```x[i] ≤ y[i]```.
```lessThanEqual()``` trả về một vector boolean mà thành phần thứ ```i``` là kết quả của phép so sánh ```x[i] ≤ y[i]```.

### Tham khảo thêm
[lessThan()](/glossary/?lan=vi&search=lessThan), [greaterThan()](/glossary/?lan=vi&search=greaterThan), [greaterThanEqual()](/glossary/?lan=vi&search=greaterThanEqual), [equal()](/glossary/?lan=vi&search=equal), [notEqual()](/glossary/?lan=vi&search=notEqual), [any()](/glossary/?lan=vi&search=any), [all()](/glossary/?lan=vi&search=all), [not()](/glossary/?lan=vi&search=not)
Loading

0 comments on commit 39a611c

Please sign in to comment.