Jump to content

Search the Community

Showing results for tags 'buffer'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 8 results

  1. ZebraRoy

    Filter Buffer

    How can I use the buffer function in filters? I want to do something like this
  2. I had made a codePen demo to show this case(and 2 screen-capture-images below) https://codepen.io/tomleader/pen/jOmNWJG There are 3 buttons(click to see the result) 1. use img: The most common way , sprite.from(imgUrl), everything is ok! 2. use buffer: a little tricky.. the process is [new a Image obj and set src=url, draw Image to another canvas, getImageData from canvas, make a texture from imgData buffer, sprite.from(texture)], and the result seems weird! 3. use dataUrl: the process is [new a Image obj and set src=url, draw Image to another canvas, canvas.toDataURL, make a texture from dataURL, sprite.from(texture)], and the result seems ok! So I think maybe the fromBuffer(imgdata) lost some pixels opacity data? OR I have some mistakes in my code? Any suggestions? Thanks ..
  3. I'm rendering the content of some PNG's via a 4096 by 4096 RenderTexture, to cram all of it in the GPU memory, for scrolling usage. As each column should be 1024 pixels wide I can store a maximum of 16384 pixels of height to scroll through. I use 4096 as width and height because of http://webglstats.com/webgl/parameter/MAX_TEXTURE_SIZE But what to do if I want more than 16384 pixels to scroll through in one go? Suddenly realised: Should I just use some extra texture(s) of 4096 by 4096? It looks like a maximum of 8 textures is a safe bet: http://webglstats.com/webgl/parameter/MAX_TEXTURE_IMAGE_UNITS Or is there a better approach?
  4. Hello, what do you think, what is the best way to show this green tree only at this gray box. I would like to hide every pixel which is outside the box, even if I will rotate a camera. http://www.babylonjs-playground.com/#2L76JS#1 This plane will be pickable and the user will be able to move it above 3D object, but it is necessary to hide pixel outside. I tried to make a layer/foreground, put there a texture made by RenderTargetTexture of gray box and mask every planes which I will add. But this solution is not good, because in this function I need to have an URL of the image, not a texture: new Layer(name, imgUrl, scene, isBackground, color) Do you have any ideas how to get this effect? Thank you in advance!
  5. hi i test some stuff about Texture and see a interested result in a large scene and one time use material with colorfull paint all and keep other effects i see fps between (45 - 60 ) and zero Ram Take and make that scene just with textures (i test DDS and Small Text too ) i see fps between (25 -40) and 2 GB Ram take any way to manage texture in buffer for optimize that? * for samples wait to load complete and see around in first time (it is not have loading or prepare stuff) I really don't understand 2G ram!!! - all my uncompressed texture size is 100mb thanks for your any advise about this .
  6. Hello folks, after nearly over an hour of debug action, I found something strange. I create an object out of some smaller objects using merge. After that, I keep one "original" in background with "isVisible = false". Then, if the settings change, I throw everything away and copy this "original". Set material, size, etc... Then I create instances of this. But I always had an error within babylon while copy. The first time it works as expected. But the second time I use copy with this "original" object, I have this error: (Line 27524: CANNOT SET .references OF UNDEFINED #ERROR) for (var kind in this._vertexBuffers) { if (numOfMeshes === 1) { this._vertexBuffers[kind].create(); } this._vertexBuffers[kind]._buffer.references = numOfMeshes; <==== CANNOT SET .references OF UNDEFINED #ERROR if (kind === BABYLON.VertexBuffer.PositionKind) { mesh._resetPointsArrayCache(); var extend = BABYLON.Tools.ExtractMinAndMax(this._vertexBuffers[kind].getData(), 0, this._totalVertices); mesh._boundingInfo = new BABYLON.BoundingInfo(extend.minimum, extend.maximum); mesh._createGlobalSubMesh(); //bounding info was just created again, world matrix should be applied again. mesh._updateBoundingInfo(); }}I noticed, that after copy, in Mesh._geometry._meshes a mesh had been added. This happend in the new copy as well as in the original one. That's the reason the second round it has "numOfMeshes = 2" and runs into this error. I have no idea why this happens or why the orignial mesh is affected by copy function? I ended up with this (ugly) workaround: function getBarType2() { var Clone = window.BarType2.clone("Pfosten Typ 2"); window.BarType2._geometry._meshes.pop(); Clone.isVisible = true; return Clone;}With this, it works as expected! Can anyone explain what happens here? Have a nice day Kevin
  7. Hey everyone, I am a little new to phaser but I am currently having a problem that I am sure not many of you would have encountered due to its uniqueness. so right now I am creating a game that needs to be destroyed a number of times. The reason I do this is because after I destroy the game the players will view the high scores of other players (multiplayer games) and that it accomplished by routes without reloading. after a duration I will be routed back to a new instance of the game. I have pin pointed the error from logs. It comes from the this.context.createBuffer in the unlock function. For some reason after the 5th time I create a game and I do a mouse click i get an error when phaser tries to create the buffer due to context being null. TypeError: null is not an object (evaluating 'this.context.createBuffer'). Would this be some memory leaks? Every time the game finishes I call destroy on the game to clean up resources and set it to null for garbage collection, but as of now I am stumped. Can anyone help??? Thank you!
  8. hello there, since this is my first post: kudos to deltakosh et al for this great work. my question is, how can i add custom attributes (buffers) to my shaders? it seems like normals, positions and uv's just magically surface when needed - yes, they're quite cleverly integrated and hidden from the developer. now i know i can cheat the system and use for example normals to send additional data to my vertex shader... but then i can't use the normal data for their original purpose anymore =p i don't want to read and understand the source code... because that is not what you're supposed to do when using a framework. if i wanted to do that, i would write my own low level framework. and -- for the life of me i can't find the info from the documentation. can anyone at least point me to the right direction?
  • Create New...