mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-07 02:12:07 +03:00
Added changes about swizzling to shading docs
This commit is contained in:
@@ -164,7 +164,11 @@ is another vector type (or scalar). This is easier shown than explained:
|
||||
vec3 b = a.ggg; // Also valid; creates a vec3 and fills it with a single vec4 component.
|
||||
vec3 b = a.bgr; // Order does not matter.
|
||||
vec3 b = a.xyz; // Also rgba, xyzw are equivalent.
|
||||
vec3 b = a.stp; // And stpq (for texture coordinates).
|
||||
float c = b.w; // Invalid, because "w" is not present in vec3 b.
|
||||
float c = b.xrt; // Invalid, mixing different styles is forbidden.
|
||||
b.rrr = a.rgb; // Invalid, assignment with duplication.
|
||||
b.bgr = a.rgb; // Valid assignment.
|
||||
|
||||
Precision
|
||||
~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user