MPxShadingNodeOverride with multiple samplers

MPxShadingNodeOverride with multiple samplers

Anonymous
Not applicable
396 Views
0 Replies
Message 1 of 1

MPxShadingNodeOverride with multiple samplers

Anonymous
Not applicable

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!

 

0 Likes
397 Views
0 Replies
Replies (0)