Steve C

  • Content Count

  • Joined

  • Last visited

  1. Question: I am working on a project in Pixi where I am managing a set of overlapping semi-translucent "brush strokes" on-screen. Each brush stroke is represented as two Sprites in two different Containers: The first Container (the "color map") keeps track of the colors and how they overlap and blend (since strokes can be semi-transparent). The second Container (the "height map") renders the same strokes but in white at high opacity to keep track of how "deep" the strokes are overlapping. I'm trying to use the height map data to calculate normals and shade the color data to give it a 3D effect with a Filter attached to the first Container. However, when I try and pass the height map Container as a sampler2D uniform, it seems to only take the texture of the very first Sprite in the Container (and he coordinates get all wacky) rather than the pixel data of the entire Container. How would I go about passing the height map Container's pixel data into to the color map Container's Filter in order to do this?