-
I want to display a texture with a noise applied to the UVs, how can i include a texture in a shader ? |
Beta Was this translation helpful? Give feedback.
Answered by
ykafia
Jan 28, 2021
Replies: 1 comment
-
Self answering : The best way to include a texture to a shader through the editor is to use composition. shader ParameterTexture : Texturing, ComputeColor
{
// This can be either a texture, a shader... Anything that implements ComputeColor
compose ComputeColor MatrixTexture;
override float4 Compute()
{
streams.TexCoord.x = 0;
float4 color = MatrixTexture.Compute();
return color;
}
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ykafia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Self answering :
The best way to include a texture to a shader through the editor is to use composition.