Message 1 of 1
MPxShadingNodeOverride with multiple samplers

Not applicable
12-26-2013
12:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is it possible to make multiple tex2D calls with different samplers in a fragment shader? It seems only the first named sampler gets connected. For example:
<texture2 name="fileMap" />
<sampler name="textureSampler" />
will sample a texture as such:
float4 color = tex2D(textureSampler, uv);
but:
<texture2 name="fileMap" />
<sampler name="textureSampler" />
<texture2 name="fileMapAlt" />
<sampler name="textureSamplerAlt" />
will fail to load a texture as such:
float4 color = tex2D(textureSamplerAlt, uv);
but still succeeds in loading the first named sampler:
float4 color = tex2D(textureSampler, uv);
Any clarification would be much appreciated!