effect question

For questions about using Classic.

Post » Tue Jul 14, 2009 4:19 am

are effects still processed on an invisible object? I suppose they don't, but i'm not sure.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Tue Jul 14, 2009 6:21 am

Not for invisible objects. I'm pretty sure, anyway, since if it's marked invisible then it's not processed by the GPU.

But for visible objects that have 0 opacity, yes they are.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Jul 14, 2009 1:12 pm

ok, here's another one..

Will an object with effects that is larger than the screen waste processing power by rendering the sprite area which is outside the screen? (let's say half of the object is onscreen, and half is offscreen)
Does the runtime draw an effect rendering boundary which borders the screen co-ordinates, so rendering time isn't wasted?
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Tue Jul 14, 2009 1:16 pm

How would the runtime know the effect isn't going to flip a sprite which is half off screen? It has to process the whole image.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Tue Jul 14, 2009 1:42 pm

[quote="Rich":3k5vr8bh]How would the runtime know the effect isn't going to flip a sprite which is half off screen?[/quote:3k5vr8bh]
true... never thought about flipping.

I was just asking because it appeared that the particle object used some sort of clipping boundary, but now i realize that that's probably only to determine size.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Tue Jul 14, 2009 5:04 pm

[quote="Davioware":3fbbsg2v]Will an object with effects that is larger than the screen waste processing power by rendering the sprite area which is outside the screen?[/quote:3fbbsg2v]
No. Graphics cards are way too optimised to do something as inefficient as process offscreen pixels. The case Rich described will cause only the visible area to be flipped, which could appear incorrect. However, this is a limitation imposed by Construct (the clever coordinate systems graphics cards use can cope with that situation), but I don't see a need to fix it, since you don't need a shader to flip an image.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Tue Jul 14, 2009 5:19 pm

Really? A lot of shaders replace pixels or modify their position.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Tue Jul 14, 2009 5:29 pm

That's what causes solid-colour edges to some effects like Magnify when near the edge of the window (the offscreen pixels are not available so it clamps to the viewport) but it would only break shaders which uniformly alter texture coordinates. Almost all shaders like magnify etc. don't uniformly alter texture coordinates so they get away with it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests