From f93ea96df00f31416589e5e5a09debf10d5a4bba Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 19 Aug 2026 22:56:49 +0200 Subject: feat(engine): lossily convert color shader bindings to rgb --- engine/src/rendering/shader/cursor.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'engine/src/rendering/shader/cursor.rs') diff --git a/engine/src/rendering/shader/cursor.rs b/engine/src/rendering/shader/cursor.rs index 82b5ec0..49f6b47 100644 --- a/engine/src/rendering/shader/cursor.rs +++ b/engine/src/rendering/shader/cursor.rs @@ -4,7 +4,7 @@ use std::hint::cold_path; use circular_buffer::FixedCircularBuffer; -use crate::color::Color; +use crate::color::{Color, Rgb, Rgba}; use crate::data_types::matrix::Matrix; use crate::data_types::vector::Vec3; use crate::rendering::object::Id as RenderingObjectId; @@ -319,6 +319,21 @@ impl From> for BindingValue BindingValue::Color(color) } } +impl From> for BindingValue +{ + fn from(color: Rgb) -> Self + { + BindingValue::Color(color.into()) + } +} + +impl From> for BindingValue +{ + fn from(color: Rgba) -> Self + { + BindingValue::Color(color.into()) + } +} impl From> for BindingValue { -- cgit v1.2.3-18-g5258