How to export base64 Sprite Image with Webgl Shader Effect?

0 favourites
  • 9 posts
From the Asset Store
High quality sound effect pack, in the following categories:Dice shaker, dice throwing
  • Hey guys!

    I modify a sprite with a shader effect on construct 2. I want to get the image with shader effect, but i don't know how.

    I get the image without shader using a function

    DrawImage()[/code:350ilux6] and print in a new buffered canvas... But i want to get the sprite with WebGL.
    
    But why do i want to do this?
    1. I want to download the sprite with the shader with browser plugin;
    2. I want to change the current sprite with the new sprite with shader and disable the sprite plugin shader. Becouse if i still using shader at run time, the game will be slow.
    
    Thanks for any help.
  • Just use the printscreen button and then paste the clipboard image into a blank project of your favourite image editor?

  • Just use the printscreen button and then paste the clipboard image into a blank project of your favourite image editor?

    I want to get the image at runtime to do a new plugin.

  • Look at the paster object, it can probably do what you want, or you can see how it does it.

    It's roughly based on how C2's runtime uses effects, because unfortunately I couldn't find a way to use it directly.

  • Look at the paster object, it can probably do what you want, or you can see how it does it.

    It's roughly based on how C2's runtime uses effects, because unfortunately I couldn't find a way to use it directly.

    Cool but i have 50 instance at the same sprite, everyone with different color effect enabled. When i use the paster and change the last instance, all the instance will have the same sprite. What do i do?

  • The animation frames of a sprite are shared between all the instances, so if you replace one they all change. You could just use paster instances instead of sprites i guess.

  • The animation frames of a sprite are shared between all the instances, so if you replace one they all change. You could just use paster instances instead of sprites i guess.

    Hum, i got it! Thanks. But. Can i use Pasters than Sprites? Pasters script is more heavy?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Each instance has it's own texture, whereas sprites share the same texture. It just depends on what you want to do.

  • Each instance has it's own texture, whereas sprites share the same texture. It just depends on what you want to do.

    I got it. Thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)