Search the Community

Showing results for tags 'alpha channel'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 4 results

  1. Hi everybody: These days I'm starting with a development involving the visualization of a shower. The software must run in desktop and mobile (this last by means of an hybrid app). In order to show the (falling) water I'm considering two strategies: chroma-keyed video with the water falling (I'm using both a mp4 and a webm containers); particles (I'm afraid of As I am concerned about the performance penalty of using particles (it needs 30,000+ and motion blur in order to resemble a "real" shower), we are tackling first the video way. Running a raw example from server, over Chrome (Win) and Safari (OSX), shows the alpha 100% clear: With Firefox (Developer Edition / 56.0b1) the alpha channel is instead shown with a degree of opacity: Do you think is possible to obtain a correct alpha in this last browser? Best regards.
  2. Hello, I have a function for playing videos on my game. It works fine, except if I play the same video again, in this case, it just draw like the first frame (or the last) as an simple image and the video never plays. Differents videos are played without problem. State.MainState.prototype.playVideo = function(video, posX, posY){ var video = new Phaser.Video(game, video); var img = video.addToWorld(posX, posY, 0, 0 , 0.8, 0.8); var fragmentSrc = [ "precision mediump float;", "varying vec2 vTextureCoord;", "uniform sampler2D uSampler;", "void main(void) {", "vec2 v1 = vTextureCoord;", "vec2 v2 = vTextureCoord;", "v1.y = vTextureCoord.y;", "v2.y = vTextureCoord.y - 0.5333;", "vec4 tex1 = texture2D(uSampler, v1);", "vec4 tex2 = texture2D(uSampler, v2);", "if(vTextureCoord.y > 0.5315)", "gl_FragColor = vec4(tex1.r, tex1.g, tex1.b, tex2.r);", "}" ]; var filter = new Phaser.Filter(game, null, fragmentSrc); img.filters = [ filter ]; var s = new Phaser.Signal(); s.add(function(){ video.destroy(); img.destroy(); }); video.onComplete = s;; };
  3. Hi, I am trying to "hack" the spritesheets limitations by using JPG images with alpha channel. The process is simple: - I have a starting PNG with alpha channel - from this PNG I save a JPG (with varying fill colour for originally transparent areas) - from the PNG I extract the alpha channel and save it as an opaque indexed colour grayscale image - I load the new JPG and the grayscale PNG, and use the PNG as alpha channel for the JPG. These are the two images, the JPG and the grayscale PNG animBitmapData is BitmapData from the JPG animBitmapData_ALPHA is BitmapData from the grayscale PNG I did everything, but the last step doesn't work, animBitmapData is still opaque animBitmapData.copyChannel(animBitmapData_ALPHA, animBitmapData_ALPHA.rect, new Point(0, 0), BitmapDataChannel.ALPHA, BitmapDataChannel.RED);animBitmapData.transparent returns false, could this be the problem? Or maybe it is not correct to use a grayscale image as alpha channel? - Coding in Haxe + OpenFl -
  4. Hi forum, I am working on a proof of concept for a game where i need to be able to place buildings (like any RTS you know). I already have some terrain generation going (I do not use tilemaps) with trees and later on other stuff. I'd like to know if it is possible somehow to calculate where a user can place buildings, and possible even draw (using PIXI.Graphics) a green colored area (around the building) where it is possible to place / install it. Circle based collisions would help at this stage, but alpha channel transparency checks would be better: i have tree textures as transparent 256*256 and 512*512 PNG's with shadow, i'd like to know when a building is being placed right near a/some tree(s). (no preloader, working version. zooming is buggy but too lazy to work on that right now :> ). Thanks for any tips / pointers!