eugene.litvinov Posted February 23, 2011 Share Posted February 23, 2011 How I can change blending type for blending images? See post with example blending. Thanks Link to comment
ulf.schroeter Posted February 23, 2011 Share Posted February 23, 2011 How I can change blending type for blending images? See post with example blending. Thanks Read the documentation for Image::blend(). Implemented blending type is described there and there is no other way to change blending behaviour of Image::blend() at the monment. If you need special blending behaviour than you can always implement it on a per-pixel level on your own via provided pixel data getter/setter via UNIGINE script Link to comment
eugene.litvinov Posted February 24, 2011 Author Share Posted February 24, 2011 Is it possible to blend (create, composite) images (layers) to get destination image with some weights of this images (layers) alphas? Link to comment
ulf.schroeter Posted February 24, 2011 Share Posted February 24, 2011 Is it possible to blend (create, composite) images (layers) to get destination image with some weights of this images (layers) alphas? Everything is possible when doing per-pixel blending via UNIGINE script pseudo-code // create same-sized images create sourceImageA; create sourceImageB; create destImage; // per-pixel-blending foreach( row ) { foreach( column ) { vec4 pixelA = sourceImageA.get2D( row, column) vec4 pixelB = sourceImageB.get2D( row, column) // some wired per-pixel blending vec4 pixelDest = blendFunction( pixelA, pixelB ) destImage.set2D( row, column, pixelDest ) } } Link to comment
eugene.litvinov Posted February 24, 2011 Author Share Posted February 24, 2011 Ok, thanks. It's decision for pre-created resources. Per-pixel manipulations in main loop "eat" to much FPS :rolleyes: Link to comment
Recommended Posts