Using textures in ShaderFX Compositions?

Hi, everyone,
I’m trying to figure out how to use textures with ShaderFX.
Particulary, I made a composition of shaders and now I want to use Texture0.Sample(…) in one of the shaders(sdsl code) but can’t figure out how do I “attach” a texture to my shader. I saw that it was implemented in RaymarchMatcap, but can’t understand how it works, coz lack of knowladge.
Any advice?

the trick is that you just make an input for a ComputeFloat4 shader and then connect a ColorMap node to the input, or patch a custom sampling graph as shown in the advanced texture sampling patch.

or do you have a very specific uv or sampling technique in mind?

Yes, I have specific uv in my shader,
it would look something like that
float2 uvs = (rd.xz/rd.y);
float d = Texture0.Sample(LinearSampler,
uvs0.025+float2(0., itime0.025)).x;

where is ray directions for raymarch, which I calculating inside my code. if it makes sense

did you see the help patch for writing your own ShaderFX node? in the same way as creating the scalar input, you can create a texture input.

and there is a concrete example in this thread:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.