mirror of
https://github.com/Eragon-Brisingr/UShaderLab.git
synced 2026-09-17 15:54:36 +00:00
18 lines
759 B
Plaintext
18 lines
759 B
Plaintext
// Copyright FlecsProj. All Rights Reserved.
|
|
//
|
|
// UE_ transform functions — forward to the engine's material HLSL. The engine function is invisible to
|
|
// the standalone IDE parser, so it is stubbed under SHADERLAB_IDE (defined only by shader-validator);
|
|
// the real shader compiler uses the true engine function.
|
|
|
|
#pragma once
|
|
|
|
#ifdef SHADERLAB_IDE
|
|
float3 RotateAboutAxis(float4 NormalizedRotationAxisAndAngle, float3 PositionOnAxis, float3 Position) { return (float3)0; }
|
|
#endif
|
|
|
|
// Rotate `Position` about the axis `NormalizedAxis` through `PivotPoint` by `Angle` radians.
|
|
float3 UE_RotateAboutAxis(float3 NormalizedAxis, float3 PivotPoint, float Angle, float3 Position)
|
|
{
|
|
return RotateAboutAxis(float4(NormalizedAxis, Angle), PivotPoint, Position);
|
|
}
|