fuckingtech/public/assets/glsl/lygia/math/rotate4dY.hlsl
Elias Rhouzlane bf76c6b086 fix: code
2025-04-06 17:23:52 +02:00

20 lines
646 B
HLSL

/*
contributors: Patricio Gonzalez Vivo
description: returns a 4x4 rotation matrix
use: <float4x4> rotate4dY(<float> radians)
license:
- Copyright (c) 2021 Patricio Gonzalez Vivo under Prosperity License - https://prosperitylicense.com/versions/3.0.0
- Copyright (c) 2021 Patricio Gonzalez Vivo under Patron License - https://lygia.xyz/license
*/
#ifndef FNC_ROTATE4DY
#define FNC_ROTATE4DY
float4x4 rotate4dY(in float r){
float c = cos(r);
float s = sin(r);
return float4x4(float4(c,0.,s,0),
float4(0.,1.,0.,0.),
float4(-s,0.,c,0.),
float4(0.,0.,0.,1.));
}
#endif