Blender
V5.3
source
blender
gpu
shaders
material
gpu_shader_material_rotate_vector.bsl.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2026 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
gpu_shader_math_quaternion.bsl.hh
"
8
9
[[
node
]]
10
void
rotate_vector
(
float3
vector
,
float4
rotation,
float3
&result)
11
{
12
result =
transform_point_by_quaternion
(
Quaternion::from_float4
(rotation),
vector
);
13
}
vector
Definition
cycles/util/vector.h:20
node
#define node
Definition
gpu_shader_cxx_attribute.hh:142
rotate_vector
void rotate_vector(float3 vector, float4 rotation, float3 &result)
Definition
gpu_shader_material_rotate_vector.bsl.hh:10
gpu_shader_math_quaternion.bsl.hh
transform_point_by_quaternion
float3 transform_point_by_quaternion(Quaternion q, float3 v)
Definition
gpu_shader_math_quaternion.bsl.hh:47
Quaternion::from_float4
static Quaternion from_float4(float4 v)
Definition
gpu_shader_math_quaternion.bsl.hh:17
float3
Definition
sky_math.h:135
float4
Definition
sky_math.h:224
Generated on
for Blender by
doxygen
1.18.0