[r161] Bumpmapping

Bugs will be moved here once resolved.

Post » Mon Feb 17, 2014 8:02 pm

Link to .capx file (required! If link is blocked remove the http and www parts):
bumpmap with tilemaps.capx

Steps to reproduce:
1. Move mouse around over tilemaps on the left and sprites on the right
2.
3.

Observed result:
No idea what's going on here :D
Comparing to sprites, bumpmapping effects acts like crazy on tilemaps and Tiled Background.

First of all Bumpmapping acts different on these object having various size and position.

and second - more important, bumpmapping is inverted on Y axis - but only with Y position. "Illumination" follows mouse properly.
I mean if you follow mouse from bottom of tilemap in up direction you can see that edges of bricks on texture are brighter - but actual light comes from upper direction. Same opposite moving mouse top to bottom. Upper edge of bricks is brighter while light comes from down.

Y axis on bumpmapping texture is set correctly, because I've been testing it with sprites at first and then moved to Tiled Background and Tilemap.

Expected result:
Bumpmapping working exactly the same way on all objects.

Browsers affected:
Chrome: yes
Firefox: -
Internet Explorer: yes

Operating system & service pack:
Win 7 64bit sp1

Construct 2 version:
r161
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,599
Reputation: 34,835

Post » Fri Feb 21, 2014 7:27 pm

The bug still exists in [r163]. And it seems like it affects every shader using vTex for sampling.
Update: Turns out it's the <extend-box-vertical> and <extend-box-horizontal> that are broken when you set their value at anything but 0.

vTex.x = 1.0 and vTex.y = 1.0 used to mean bottom right corner, but it seems to be reversed now, and now points to top right.

On top of that, shaders specific to a game object seem to receive the vTex.y from the layer they are in world space, not from the pixel in object space.

Here is an example file: http://www.mediafire.com/download/uwqa8 ... ndcapx.rar

TL;DR: vTex.y now 1.0 - vTex.y and is received as layer vTex instead of object vTex but only when setting <extend-box-vertical> or <extend-box-horizontal> to anything other than 0
B
6
S
1
G
1
Posts: 39
Reputation: 1,153

Post » Mon Feb 24, 2014 5:06 pm

I haven't posted it as a new bug report, but maybe I should ?
B
6
S
1
G
1
Posts: 39
Reputation: 1,153

Post » Mon Feb 24, 2014 6:12 pm

@Kaisirak I don thinks it's necessary. It all seems connected.
Let me Just use @Ashley - to let him know about this.
B
157
S
66
G
41
Posts: 2,599
Reputation: 34,835

Post » Tue Feb 25, 2014 5:53 pm

@shinkan, it seems your summoning powers aren't as strong as you thought.

Let me give it a try. @Ashley I summon thee
B
6
S
1
G
1
Posts: 39
Reputation: 1,153

Post » Wed Feb 26, 2014 11:18 am

We are aware of all bug reports posted here. Please allow us enough time to investigate. We are currently busy with multiplayer features which might increase the time it takes to investigate new reports.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Wed Feb 26, 2014 10:19 pm

No sweat @Ashley, just making sure you know about it since it's such an integral part of C2, and I have been really invested in writing a bunch of shaders lately.

Keep up the great work
B
6
S
1
G
1
Posts: 39
Reputation: 1,153

Post » Sat Apr 05, 2014 12:19 am

This is a callback to a problem from rev161, mentioned here: r161-bumpmapping_t95603

After many updates, the problem is still there. When you set either extend-box-horizontal or extend-box-vertical to any value other than 0, your shader will not work as intended. vTex.y coordinates get flipped upside down and the borders of the image in the shader seem to extend way beyond the image's actual borders.

I created two videos to illustrate this, a shader that simulates a tree bending left and right periodically, and with more intensity the farther the pixel is from the root. The only difference in the two videos, is that I changed the extend-box-horizontal in the shader from 0 to 5.

Working like it should http://youtu.be/Kzpgi4Z6YUc

NOT working http://youtu.be/ml5X0IB7Kes

Problem exists at least in the previewer, once exported, on firefox, chrome and node webkit
B
6
S
1
G
1
Posts: 39
Reputation: 1,153

Post » Thu Apr 10, 2014 1:04 am

Oops, maybe I jumped the gun here.. looks like you guys may have identified my problem too, which I've first noticed in R165:

viewtopic.php?f=151&t=101366
B
72
S
14
G
1
Posts: 151
Reputation: 4,999

Post » Thu Apr 10, 2014 7:32 am

@remy-jay Unfortunately this issue is present since WebGL shaders was added to C2 and probably won't be fixed any time soon.
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,599
Reputation: 34,835

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest