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…
Well that seems to work ^
However, it requires an extra script, which isn’t optimal.
If you wish to create a shader where you can set a texture in the game studio, the following code should work:
shader TextureShader: ComputeColor
{
//Not necessarily a texture, it can also be a different shader, a color, etc.
compose ComputeColor MatrixTexture;
override float4 Compute()
{
return MatrixTexture.Compute();
}
};