Page 1 of 1

Shader effect, unknown type

Posted: 18 Apr 2022, 11:40
by simonb
HI I am trying to use a Shader Effect on an Image in Unity.
The code is happy to run in Blend (but gives a weird effect)
But its giving me a error " Unknown type 'NoesisGUIExtensions.TintEffect'" when it runs in Unity?
Am I doing something obviously wrong?
(v3.1.4)

	 xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"


        <Image
            Name="Basemap"
            Width="800"
            Height="600"
            Margin="0,0,0,0"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Source="{Binding StoryImage}"
            Stretch="UniformToFill" >
            <Image.Effect>
                <noesis:TintEffect Color="Orange"/>
            </Image.Effect>
        </Image>
        

Re: Shader effect, unknown type

Posted: 18 Apr 2022, 12:58
by jsantos
Before going into more detail, have you tried the example "VideoEffect" included in our package? It comes with a Tint effect.

Re: Shader effect, unknown type

Posted: 19 Apr 2022, 18:36
by simonb
I have had a look and successfully got my image tinting working via the examples approach of adding a new ShaderEffect class & a shader into Unity.

Out of interest does the NoesisApp Tinting shader described here still work?
https://www.noesisengine.com/docs/App.S ... s_doc_wrap

or was I using it incorrectly?

Re: Shader effect, unknown type

Posted: 20 Apr 2022, 17:34
by jsantos
NoesisApp shaders are not available in Unity. We have plans to include them in the future but I think it is always going to be better implementing your own specific shader tailored to what you need in your game.

Note also that for tinting, a Shader Brush is going to be more efficient. For example see MonochromeBrushShader

Re: Shader effect, unknown type

Posted: 22 Apr 2022, 11:06
by simonb
Got, it.
Many thanks for the info :)