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();
}
};