I've been using Director for years, but am new to 3D.
I have a plane, that the user dynamically swaps textures on
-- member("Scene2").shader("planeShader").texture =
(I load the chosen texture from a file into cast member
The above shows the users "driveway" I am now trying to add
another texture layer, which will be a bitmap of a patterned
circle: a square png with a circular alpha channel) so the user can
move it around to see where on their driveway they'd like it
the outcome will show my base texture (from the lines of
code above) and a circle on top of that texture that the user can
move, so the perspective will automatically adjust as they move it
around the plane.
But I can't get the second texture to work, I've tried things
The easiest thing might be to just create another plane with
another texture on top. Otherwise, just use the shader's
texturelist[ ] property to do the work and disregard #meshDeform.
Set the texturelist of your shader to the driveway bricks,
then shader's texturelist to your texture with the alpha. Then
set shader's blendFunctionList to #blend, and blendsourceList
Your alpha texture will then be a "decal" on top of the
bricks texture. You can then move the decal texture around using
textureTransfromList.position. But make sure your alpha has
enough "whitespace" on the edges, else you'll get streaking.
** Important to note that the renderer will affect how this
looks. I think the above description is good with directX but if
using openGL you may need to use blendsourceList = #constant and
blendConstantList = 100.