Search the Community
Showing results for tags 'compositing'.
Found 3 results
The default bloom post process extracts all pixels brighter than a threshold, blurs that image, and overlays it onto the original render. The problem is that it simply adds the RGB values of the 2 images together, resulting in already bright areas becoming way too bright. I want to use BABYLON.Engine.ALPHA_MAXIMIZED as the blend mode for bloom. How do I do that? Do I need to write a whole new bloom shader from scratch?
I need these features if I'm to use Pixi to be able to finish a js library I'm making, which uses primitives allot (e.x. Pixi Graphics). a ) or "dashed strokes" is straight forward, I just need to be able to created dashed strokes on PIXI Graphics objects (see here: http://www.rgraph.net/blog/2013/january/html5-canvas-dashed-lines.html ) b ) or "complex shapes" is just complex shapes as refered to here: http://www.goodboydigital.com/wp-content/uploads/2013/06/complexPolygon.png , which would be nice to have but is not as important as the others. c ) or "gradient fill", especially radient gradient fill, as seen here: http://www.html5canvastutorials.com/tutorials/html5-canvas-radial-gradients/ d ) or "compositing" (globalCompositeOperation), as explained here: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Canvas_tutorial/Compositing And I'm wondering about three things: 1. Is any of this built into Pixi right now? 2. If not built in, is there a hack I can use? 3. If neither, will it be supported eventually? Thanks
I'm trying to figure out the best way to implement composite sprites with pixijs / grapefruitjs. In case you don't know what compositing is, here's the definition from the wiki article : Compositing is the combining of visual elements from separate sources into single images, often to create the illusion that all those elements are parts of the same scene. Pixijs was written so that each sprite holds reference to a single texture. If you are trying to create a game like diablo, where a players visual representation may consist of textures layered on top of each other, then you cannot use a single sprite to represent your player entity - instead you must use a collection of sprites. It seems like a PIXI.DisplayObjectContainer (represents a collection of display objects. It is the base class of all display objects that act as container for other objects) would work perfectly here. This is also the class that the PIXI.Sprite class extends from. So my implementation thus far, is to use a displayobject container (grapefruit wraps this object with another container class) so a Grapefruit.Container object really, and use that object to hold reference to all of my sprites. I then add this container object to my tilemap and the sprites are rendered to the screen like I would expect - but not in the correct position. The thing is, display object containers have their own position, rotation, scale, etc... properties, which isn't necessarily a bad thing. I am noticing the one thing they are lacking though - an anchor property. This means I will manually have to compensate for the anchor or figure out another way to do this... This seemed like the most straightforward approach to take, without having to touch pixijs, but maybe I'm just overcomplicating things? Thanks! -Zach