I have a video texture and I would like to add another texture on top of it (PNG) before it becomes a layer. I know you can layer layers, but is this possible with textures (I have a vertex shader that takes a texture in and outputs a layer and I want both textures to undergo the same transform).
correct me if i misunderstood you: you are using a vertex shader that deforms a mesh and applies a texture to the deformed mesh, and you would like to display/overlay a second texture with the same deformation?
i think you could either run the second texture (which has an alpha channel, i presume) through a copy of the same shader, or - probably more efficient - add a second texture input to the original shader. i don’t know if it is possible to invoke multiple different samplers in the same pixelshader run, but if it is, you could solve the overlay with a few extra lines.
you could either run the second texture (which has an alpha channel, i presume) through a copy of the same shader,
Yup. This is what I am doing at the moment. I was looking for a way to get rid of the second shader
add a second texture input to the original shader. i don’t know if it is possible to invoke multiple different samplers in the same pixelshader run, but if it is, you could solve the overlay with a few extra lines.
Sounds like a good plan. I’m not sure how to do it though.
Are these the only two options? There is no existing node to merge textures?
i don’t think there is a node for merging textures in the sense of blending them over/between them.
but now that you mention it, you can of course Cons (EX9.Texture) your textures and put them into the same texture input. i don’t know how shaders are spreaded exactly, but i’m afraid the rendered result would be equivalent to using two separate shaders (the two layers would be rendered one after the other), so this might not be the situation you aim for…