Saturation Effect Usage
Should Saturation Effect work in Unity projects? From what I can tell, NoesisGUIExtensions is installed for Unity. Most extensions work, but this one does not for me. To clarify, I am not trying to get Blend to recognize this extension -- I'm just trying to use it within Unity w/ Noesis.
I'm trying the following code
I'm trying the following code
Code: Select all
<StackPanel
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:noesis="clr-namespace:NoesisGUIExtensions"
Orientation="Horizontal">
<Image Source="Images/tulip.png"/>
<Image Source="Images/tulip.png">
<Image.Effect>
<noesis:SaturationEffect Saturation="0"/>
</Image.Effect>
</Image>
</StackPanel>
Code: Select all
[NOESIS/E] Assets/User Interface/UIStateMachine.xaml(29,17): Unknown element type 'noesis:SaturationEffect' (NoesisGUIExtensions.SaturationEffect)
Re: Saturation Effect Usage
ShaderEffects listed in the Class Hierarchy are not available in Unity. You can find some of them (but not Saturate) in the VideoEffect sample that comes with the Unity package.
Saturate effect is available in the C++ SDK, you can use it to create something similar in Unity:
And yes, this is something we should fix.
Saturate effect is available in the C++ SDK, you can use it to create something similar in Unity:
Code: Select all
#include "HLSLHelpers.hlsli"
cbuffer Constants: register(b1)
{
float saturation;
}
float4 main(in In i): SV_TARGET
{
float4 c = GetInput(i);
return GetOpacity(i) * float4
(
c.r * (0.213f + 0.787f * saturation) + c.g * (0.715f - 0.715f * saturation) + c.b * (0.072f - 0.072f * saturation),
c.r * (0.213f - 0.213f * saturation) + c.g * (0.715f + 0.285f * saturation) + c.b * (0.072f - 0.072f * saturation),
c.r * (0.213f - 0.213f * saturation) + c.g * (0.715f - 0.715f * saturation) + c.b * (0.072f + 0.928 * saturation),
c.a
);
}
Who is online
Users browsing this forum: saji8k, Semrush [Bot] and 4 guests