summaryrefslogtreecommitdiffstats
path: root/scene/resources
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2024-11-26 21:43:46 -0800
committerclayjohn <claynjohn@gmail.com>2024-11-26 21:43:46 -0800
commit9e34e454805f0dc6aad459170e7a2bbdaf2d4575 (patch)
tree585bfb62024f31cd095dca8ab843db8f759ef7a2 /scene/resources
parent0c45ace151f25de2ca54fe7a46b6f077be32ba6f (diff)
downloadredot-engine-9e34e454805f0dc6aad459170e7a2bbdaf2d4575.tar.gz
Use Vector4 for texture mask in BaseMaterial to avoid converting to and from Plane
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/material.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index ecc1982aa5..96719a9e76 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -2737,13 +2737,13 @@ float BaseMaterial3D::get_grow() const {
return grow;
}
-static Plane _get_texture_mask(BaseMaterial3D::TextureChannel p_channel) {
- static const Plane masks[5] = {
- Plane(1, 0, 0, 0),
- Plane(0, 1, 0, 0),
- Plane(0, 0, 1, 0),
- Plane(0, 0, 0, 1),
- Plane(0.3333333, 0.3333333, 0.3333333, 0),
+static Vector4 _get_texture_mask(BaseMaterial3D::TextureChannel p_channel) {
+ static const Vector4 masks[5] = {
+ Vector4(1, 0, 0, 0),
+ Vector4(0, 1, 0, 0),
+ Vector4(0, 0, 1, 0),
+ Vector4(0, 0, 0, 1),
+ Vector4(0.3333333, 0.3333333, 0.3333333, 0),
};
return masks[p_channel];