How to use texture in custom shader ? Please help


#1

I spended several hours in attempts to set texture to custom shader on XLSL… Looks like Xenko completely lack the possibility to transfer texture into custom shader… Somebody explain me why and how to make it correctly ? The code below compiles correctly but fail execution at runtime…

shader TextureColor<Texture2D myTexture> : ComputeColor, Texturing
{
    override float4 Compute()
    {
        return myTexture.Sample(LinearSampler, streams.TexCoord);
    }
};  

neither

shader TextureColor<Texture2D myTexture> : ComputeColorTexture<myTexture, TEXCOORD0>
{
    override float4 Compute()
    {
        return base.Compute();
    }
};

#2

Ok, looks like im not alone with this problem - I created a new issue on Github - https://github.com/SiliconStudio/xenko/issues/631