[PLUGIN] Paster

Post your completed addons to share with the community

Post » Thu Oct 24, 2013 4:07 pm

This is fantastic. It looks like I'll be able to use this to significantly boost performance all over my game!

However, I'm a little confused with the 'resolution' setting. It seems like I get a 1:1 ratio (i.e. pasted object in same position/size as the original object) if the X and Y resolution are window width and height, respectively. This is all well and good, however for some reason setting resolution every tick breaks the object.

You can see the issue in this capx.

Any idea why this is happening? I have to set resolution every tick to make sure the game supports the user resizing the window.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Thu Oct 24, 2013 6:02 pm

@sqiddster
This is by design, the set resolution action deletes it's current texture and creates another of the new size, so anything that's drawn to the object is lost. Resolution is basically the internal texture size of the object, and it defaults to the initial size of the object. It is completely independent of the object's size and any drawing done to it is mapped accordingly with no extra events to position it right.

In the case of your example just set the resolution once. If you set it to 1024x1024 it will look crisp if the window size is anything from 512x512 to 1024x1024. On a side note the largest supported texture size for webgl is 2048x2048.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Thu Oct 24, 2013 6:24 pm

@r0j0hound it's not about it looking crisp - it's about having the object pasted appear where it acually is. If I set the resolution to 1024x1024, the pasted object appears as a different size and position as the original object.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Thu Oct 24, 2013 7:21 pm

Ah, I hadn't looked into the case where the resolution is larger than the size. I'll be looking into it.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Thu Oct 24, 2013 8:11 pm

https://dl.dropboxusercontent.com/u/105711543/PasterExample.capx

Sorry for taking so long. This might be related to the resolution issue Sqiddster brought up. I'm not sure if that feature existed the first time I used this.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Thu Oct 24, 2013 10:26 pm

Thanks, r0j0. Let me know when you get it fixed!
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Fri Oct 25, 2013 8:42 pm

@sqiddster
The issue should be fixed now, re-download from first post.

@MadFactory
It's pasting fine here. Tested with r148 and Firefox 24.0. I also tested with chrome but not the latest.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Fri Oct 25, 2013 9:15 pm

@R0j0hound, cool, thanks. it works well!

Now, a question. If I have a ridiculously huge paster object, should I expect it to use the same VRAM as an image of the same size?
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,689

Post » Sat Oct 26, 2013 1:34 am

The resolution is the size of the texture the plugin uses and by default it uses the initial size of the instances. So ya, it VRAM usage is the same as an equivalently sized image. The only limit other than memory is the max texture size which on my PC is 4096x4096.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Sat Oct 26, 2013 1:41 am

Didn't you say above though that the max texture size for webgl is 2048x2048? I'm not understanding why you're saying the max texture size can be different in two posts.Arima2013-10-26 01:43:51
Moderator
B
95
S
34
G
33
Posts: 3,006
Reputation: 27,874

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest