Jump to content

Render texture bigger pixels.


Recommended Posts

How to make a renderTexture with bigger pixels?

i want the "pixel" to be the actual size of the pixel, is that possible?

   let rt = this.add.renderTexture(0010001000);
    this.input.on('pointermove'function (pointer) {
        if (pointer.isDown)
    }, this);
Link to comment
Share on other sites

  • 2 weeks later...

What is your 'pixel' key referring to? It doesn't look like the RenderTexture's draw method takes a string for the first argument.

You can create an Image or Sprite with the 'pixel' key if it refers to a loaded texture. You should then be able to adjust the scale and pass that instance into rt.draw()

Something like:

// created in create()
const pixel = this.make.image({ key: 'pixel' }, false)

// update the scale to get the size you want

// then later in the mouse pointermove handler...
rt.draw(pixel, pointer.x, pointer.y)


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...