--- Log opened Sat Jul 08 00:00:30 2017 20170708 00:01:35-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170708 00:01:56-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has joined #wesnoth-dev 20170708 00:24:28-!- Greg-Boggs [~greg_bogg@173.240.241.83] has quit [Remote host closed the connection] 20170708 00:37:49-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170708 00:37:55-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170708 01:05:06-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170708 01:35:17-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has joined #wesnoth-dev 20170708 01:39:12-!- Greg-Boggs [~greg_bogg@c-76-115-139-154.hsd1.or.comcast.net] has quit [Ping timeout: 240 seconds] 20170708 01:58:06-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has joined #wesnoth-dev 20170708 02:04:30-!- celmin [~celticmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20170708 02:48:26-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170708 03:21:04-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170708 03:21:11-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170708 04:17:51-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has quit [Quit: Connection closed for inactivity] 20170708 04:27:45-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170708 04:38:24-!- celmin [~celticmin@unaffiliated/celticminstrel] has quit [Quit: And lo! The minstrel departs, to spread the music to the masses!] 20170708 04:48:20-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has joined #wesnoth-dev 20170708 04:52:41-!- Kwandulin [~Kwandulin@p200300760F12B3BAA052767FBA251EC0.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170708 04:58:58-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has joined #wesnoth-dev 20170708 05:05:09-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170708 05:20:44-!- celticminstrel is now known as celmin|Zzzzzz 20170708 05:46:56-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has joined #wesnoth-dev 20170708 06:03:34-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170708 06:03:41-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170708 06:56:36-!- boucman [~rosen@wesnoth/developer/boucman] has joined #wesnoth-dev 20170708 07:18:01-!- mjs-de [~mjs-de@x4db6d141.dyn.telefonica.de] has joined #wesnoth-dev 20170708 08:03:27-!- JyrkiVesterinen [~JyrkiVest@85-23-197-3.bb.dnainternet.fi] has joined #wesnoth-dev 20170708 08:33:12-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170708 08:39:49-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has joined #wesnoth-dev 20170708 09:00:21-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has joined #wesnoth-dev 20170708 09:16:18-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170708 09:25:51-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:bde1:834c:547e:fe09] has joined #wesnoth-dev 20170708 09:28:11-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has joined #wesnoth-dev 20170708 09:30:07-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:bde1:834c:547e:fe09] has quit [Ping timeout: 258 seconds] 20170708 10:01:53-!- JyrkiVesterinen [~JyrkiVest@85-23-197-3.bb.dnainternet.fi] has quit [Quit: .] 20170708 10:23:01-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has quit [Quit: Connection closed for inactivity] 20170708 10:30:25-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170708 10:30:41-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has joined #wesnoth-dev 20170708 10:33:37-!- Kwandulin [~Kwandulin@p200300760F12B3BAA052767FBA251EC0.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20170708 10:44:34-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has joined #wesnoth-dev 20170708 10:46:35-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 10:55:11-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Read error: Connection reset by peer] 20170708 10:56:04-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 11:00:09-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Read error: Connection reset by peer] 20170708 11:02:04-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 11:07:03-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170708 11:07:15-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 11:08:34-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Read error: Connection reset by peer] 20170708 11:11:07-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 11:13:06-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Client Quit] 20170708 11:13:16-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 11:18:17-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 11:18:50-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 11:21:34-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 11:21:53-!- stikonas_ [~gentoo@wesnoth/translator/stikonas] has quit [Client Quit] 20170708 11:39:44-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170708 12:04:39-!- JyrkiVesterinen [~JyrkiVest@85-23-197-3.bb.dnainternet.fi] has joined #wesnoth-dev 20170708 12:24:13-!- Kwandulin [~Kwandulin@p200300760F12B3BAA052767FBA251EC0.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170708 12:25:45-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:bde1:834c:547e:fe09] has joined #wesnoth-dev 20170708 12:30:52-!- Greg-Boggs [~greg_bogg@2601:1c2:f00:9780:bde1:834c:547e:fe09] has quit [Ping timeout: 276 seconds] 20170708 12:32:16-!- aeth [~Michael@wesnoth/umc-dev/developer/aethaeryn] has quit [Ping timeout: 260 seconds] 20170708 13:21:20-!- aeth [~Michael@wesnoth/umc-dev/developer/aethaeryn] has joined #wesnoth-dev 20170708 13:48:45-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170708 13:48:51-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170708 13:54:17-!- mjs-de [~mjs-de@x4db6d141.dyn.telefonica.de] has quit [Ping timeout: 260 seconds] 20170708 14:12:45-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 14:17:32-!- crimson_penguin [~ben@wesnoth/developer/crimsonpenguin] has joined #wesnoth-dev 20170708 14:43:44-!- Kwandulin2 [~Kwandulin@p200300760F12B3BAA052767FBA251EC0.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170708 14:45:08-!- Kwandulin [~Kwandulin@p200300760F12B3BAA052767FBA251EC0.dip0.t-ipconnect.de] has quit [Ping timeout: 240 seconds] 20170708 14:54:19-!- Kwandulin2 [~Kwandulin@p200300760F12B3BAA052767FBA251EC0.dip0.t-ipconnect.de] has quit [Read error: Connection reset by peer] 20170708 14:57:07-!- vincent_c [~bip@vcheng.org] has quit [Ping timeout: 276 seconds] 20170708 15:00:47-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 15:01:20-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 15:09:14-!- celmin|Zzzzzz is now known as celticminstrel 20170708 15:13:08-!- vincent_c [~bip@vcheng.org] has joined #wesnoth-dev 20170708 15:28:43-!- RatArmy_ [~ratarmy@om126211113152.13.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170708 15:39:52-!- Bonobo [~Bonobo@203.63.51.218] has quit [Ping timeout: 260 seconds] 20170708 15:54:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 15:54:54-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 15:58:09-!- mjs-de [~mjs-de@x4db6d141.dyn.telefonica.de] has joined #wesnoth-dev 20170708 16:05:26-!- celmin [~celticmin@unaffiliated/celticminstrel] has joined #wesnoth-dev 20170708 16:22:17-!- duncan_shriek [~roland@2a02:810d:dc0:59:a613:ad5d:efd:4ad5] has joined #wesnoth-dev 20170708 16:22:35-!- duncan_shriek is now known as roland_ 20170708 16:31:36-!- Kwandulin [~Kwandulin@p200300760F12B3BAC0B370BFFD560587.dip0.t-ipconnect.de] has joined #wesnoth-dev 20170708 16:47:14-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 16:47:47-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 16:58:34-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has quit [Ping timeout: 255 seconds] 20170708 17:02:30-!- Ravana_ [~Ravana@unaffiliated/ravana/x-2327071] has joined #wesnoth-dev 20170708 17:38:17-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20170708 17:39:25-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Client Quit] 20170708 17:39:48-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 17:40:12-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has joined #wesnoth-dev 20170708 17:40:21-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 17:53:04-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170708 17:53:10-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170708 17:56:35-!- DeFender1031 [~DeFender1@89-138-160-34.bb.netvision.net.il] has joined #wesnoth-dev 20170708 17:56:39-!- Kwandulin [~Kwandulin@p200300760F12B3BAC0B370BFFD560587.dip0.t-ipconnect.de] has quit [Quit: [endlevel]] 20170708 17:57:57< DeFender1031> Hmm... quiet in here lately. 20170708 18:03:21-!- crimson_penguin [~ben@wesnoth/developer/crimsonpenguin] has quit [Read error: Connection reset by peer] 20170708 18:03:23-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 18:03:56-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 18:06:37-!- crimson_penguin [~ben@wesnoth/developer/crimsonpenguin] has joined #wesnoth-dev 20170708 18:07:23< celmin> …oh hey, ~ROTATE() currently only supports multiples of 90 degrees, huh. 20170708 18:07:50< celmin> …no wait, it just has special cases for multiples of 90. 20170708 18:08:19< zookeeper> it's certainly documented as only supporting multiples of 90 20170708 18:08:25< zookeeper> (or was the last time i checked) 20170708 18:13:01-!- vultraz_iOS [uid24821@wesnoth/developer/vultraz] has quit [Quit: Connection closed for inactivity] 20170708 18:13:11< celmin> I guess the documentation is wrong then. 20170708 18:13:23< celmin> Or has changed since you last checked, I guess. 20170708 18:13:48< zookeeper> "degrees - The number of degrees by which the image will be rotated. This must be a multiple of 90." 20170708 18:14:27< celmin> I'm trying to figure out what rotate_any_surface is actually doing. 20170708 18:14:47< celmin> While OpenGL handles the rotation without any special effort, getting the new dimensions will have to be done on the CPU... 20170708 18:15:45< DeFender1031> I also recall it only supporting multiples of 90. 20170708 18:15:59< celmin> Maybe this is new in 1.13, I dunno. 20170708 18:16:18< DeFender1031> And yes, any rotation algorithm should have shortcuts for multiples of 90. 20170708 18:16:28< celmin> (Actually I already implemented the rotation in my IPF shader stuff, though it's not yet parsing the ROTATE() IPF into that.) 20170708 18:16:45< celmin> I don't really think a shortcut is needed for multiples of 90. 20170708 18:17:05< DeFender1031> Honestly, ROTATE suppoting other values could get very messy in terms of positioning. 20170708 18:17:05< celmin> Though maybe it could be done rather simply... 20170708 18:17:27< celmin> I assume the intention is to use the minimal bounding box to avoid anything getting cut off. 20170708 18:17:45< DeFender1031> celmin, standard rotation algorithms need all sorts of matrix logic to present decently. Multiple of 90 are literally just rearranging the existing pixels. 20170708 18:17:51< celmin> So with 45 degrees the new dimensions are the original diagonals. 20170708 18:18:05< celmin> Yeah, I'm using matrix multiplication in the shader. 20170708 18:18:21< celmin> That's literally all it is - multiply three affine matrices. 20170708 18:19:09< DeFender1031> celmin, right. My point is that matricies are slow, and since multiples of 90 are by far the most common case, AND have a very simple optimization that is orders of magnitude faster, it makes sense to do so. 20170708 18:19:19< celmin> (The input is a pivot point and an angle in degrees, so it's translate the origin to the pivot, rotate around the origin, and reverse the original translation. Not quite sure if that's right, mind you.) 20170708 18:20:09< celmin> Okay, so given a square of size 1x1, what would this optimization be? 20170708 18:21:27< celmin> I guess it'd be totally different for 90 / -90 than for 180? 20170708 18:21:44 * celmin totally missed the chance to write ±90... 20170708 18:21:59< celmin> Apparently 180 is equivalent to flipping both horizontally and vertically... 20170708 18:22:34-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20170708 18:24:47< DeFender1031> Exactly. 20170708 18:25:27< DeFender1031> The optimization is basically to loop through the columns and put them in as rows instead. 20170708 18:25:53< DeFender1031> or in the case of 180, loop through from top-left to bottom-right and put them in from bottom-right to top-left. 20170708 18:26:03< celmin> Okay, so 90 degress is "swap your coordinates"? 20170708 18:26:12< celmin> ^degrees 20170708 18:26:46< DeFender1031> multiples of 90 are swapping coordinates, yes. 20170708 18:26:57< celmin> And -90? 20170708 18:27:08-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Quit: Konversation terminated!] 20170708 18:27:24< DeFender1031> 90 : read from top 20170708 18:27:26< DeFender1031> ack 20170708 18:28:11< celmin> I suppose -90 could be done by a 180 followed by a 90, if nothing else. 20170708 18:28:21< celmin> Though I doubt that's the optimal method. 20170708 18:28:33< DeFender1031> no, they're all doable as a simple coordinate swap. 20170708 18:29:14< celmin> Well, they can't both be a simple coordinate swap. 20170708 18:29:19< DeFender1031> sure they can/ 20170708 18:29:31< DeFender1031> it's just a different set of coordinates being swapped. 20170708 18:29:32< celmin> One of them needs to be slightly more complicated than a simple coordinate swap. 20170708 18:29:35< celmin> ... 20170708 18:29:37< celmin> Uhh. 20170708 18:29:47< celmin> There are only two coordinates. There's only one way to swap them. 20170708 18:29:57< DeFender1031> Oh, that's what you mean. 20170708 18:30:10< JyrkiVesterinen> Coordinate swap and subtraction. It's not exactly complex... 20170708 18:30:10< DeFender1031> I thought you meant swapping a,b with x,y 20170708 18:30:17< celmin> So like, dest.xy = src.yx 20170708 18:30:37< DeFender1031> okay, that's what you mean. 20170708 18:30:48< DeFender1031> IIRC, that'll end up doing a flip as well. 20170708 18:31:04< DeFender1031> Yeah, that'll flip it across the diagonal. 20170708 18:31:15< celmin> So that's not a rotate by 90? 20170708 18:31:21< DeFender1031> it's close. 20170708 18:31:42< DeFender1031> you'd have to subtract one of the coordinates by the full width 20170708 18:31:51< DeFender1031> hang on, let me work out the actual math for you 20170708 18:33:10< DeFender1031> The degrees are clockwise? Meaning 90 is one clockwise turn, -90 would be one counter-clockwise turn? 20170708 18:33:23< celmin> Yeah. 20170708 18:33:36< DeFender1031> Okay, I'll have real math for you in a minute. 20170708 18:44:56< DeFender1031> if starting width is w, starting height is h, x1 and y1 are the starting coordinates, and x2 and y2 are the ending coordinates then: 20170708 18:44:57< DeFender1031> 90 is x2=h-1-y1, y2=x1 20170708 18:44:59< DeFender1031> 180 is x2=w-1-x1, y2=h-1-y1 20170708 18:45:00< DeFender1031> -90 is x2=y1 y2=w-1-x1 20170708 18:45:11< DeFender1031> I'm pretty sure I did that right. 20170708 18:45:45< celmin> Uh. 20170708 18:46:01< celmin> So I guess I replace (w-1) with 1 and (h-1) with 1? 20170708 18:46:27< DeFender1031> huh? 20170708 18:46:46< celmin> Since w and h are both 1 it doesn't make sense to be subtracting 1 from them? 20170708 18:46:49< DeFender1031> is this not done by pixel coordinates? 20170708 18:46:53< JyrkiVesterinen> DeFender1031: Shaders work with relative coordinates. 20170708 18:46:59< celmin> No, texture coordinates. 20170708 18:47:11< DeFender1031> relative to what? 20170708 18:47:33< JyrkiVesterinen> (0,0) is the bottom-left corner, and (1,1) is the top-right corner. 20170708 18:47:40< JyrkiVesterinen> All other pixels are fractional. 20170708 18:47:44< DeFender1031> ah, got it. 20170708 18:48:06< celmin> Do we want to flip that so (0,0) is the top left etc, BTW? Not sure if it would matter though. 20170708 18:48:34< JyrkiVesterinen> I'd prefer following the OpenGL convention, which is bottom at zero. 20170708 18:48:45< DeFender1031> then I'm not sure how to do this math, sine the distance represented by "1" could be different in one direction than the other. 20170708 18:49:11< DeFender1031> since* 20170708 18:49:16< celmin> (No point jumping through the extra hoops to shift the coordinate system if it doesn't actually make any difference.) 20170708 18:49:42< celmin> Surely the distance represented by 1 would effectively just vanish? 20170708 18:50:01< DeFender1031> that's not what i mean. 20170708 18:51:21< DeFender1031> what I mean is that if 0,0 is always the bottom left, and 1,1 is always the top right, then a 100*200 image would have each pixel being 0.005 tall and 0.01 wide. 20170708 18:52:13< DeFender1031> which means that you couldn't apply a transformation which makes use of the width in a new y coordinate or the height in a new x coordinate without also including the ratio. 20170708 18:52:27< DeFender1031> which changes the match slightly for 90 and -90 20170708 18:52:31< DeFender1031> math* 20170708 18:53:28< DeFender1031> assuming you even have access to that ratio 20170708 18:53:58< celmin> I'm not convinced the ratio is needed, but… if necessary, it can be determined. 20170708 18:54:57< DeFender1031> no? when the old width is the new height, using "1" for everything won't screw it up since the "1"s are not actually equivalent? 20170708 18:55:25< DeFender1031> a 100x200 image being rotated by 90 or -90 will end up being 200x100 20170708 18:55:39< celmin> Well, the shader doesn't need to care about that though. 20170708 18:55:51< DeFender1031> why not? 20170708 18:56:56< DeFender1031> or are you saying that the ending dimensions are also defined irrespective of the coordinates? 20170708 18:57:08< celmin> Because when the shader is used to draw on a 200x100 rectangle I think it should just work out? 20170708 18:57:20< DeFender1031> so you say "take this image, do this relative transformation, then output that at this size"? 20170708 18:58:20< DeFender1031> Sorry, I know math and how to work with coordinates, not so much about how shaders work. 20170708 18:58:23< JyrkiVesterinen> The fragment shader is merely called for every pixel that needs to be rendered. The shader itself doesn't care about the size of the output rectangle. 20170708 18:58:42< celmin> The shader is divided into two parts – the vertex shader, and the fragment shader. The vertex shader is called (in this case) four times, once for (0,0), once for (1,0), once for (0,1), once for (1,1). This is the part that generally handles transformations, though it could also be done in the fragment shader. 20170708 18:59:07< DeFender1031> JyrkiVesterinen, so again, it just works internally with whatever relative to 1,1 and then scales the output to the given output size? 20170708 18:59:14< celmin> (By transformations I mean in the mathematical sense, just to be clear.) 20170708 18:59:34< celmin> (Should I be handling flip, rotate, etc in the fragment shader instead?) 20170708 18:59:43< celmin> (It would actually make some of this a little easier.) 20170708 18:59:56< JyrkiVesterinen> DeFender1031: No. The rasterizer first calls the vertex shader for every vertex, as celmin explained above. 20170708 19:00:07< DeFender1031> I don't know what that means. 20170708 19:00:28< JyrkiVesterinen> Then it calls the fragment shader for every resulting pixel. Images aren't explicitly scaled at any point. 20170708 19:01:03< DeFender1031> I still don't know what that means. 20170708 19:01:45< JyrkiVesterinen> Scaling ends up happening if the source texture is of a different size than the output rectangle. But there isn't any part of the pipeline that explicitly scales stuff - the rasterizer merely calculates pixel coordinates for every pixel, then calls the fragment shader, and renders the resulting pixel. 20170708 19:01:49< DeFender1031> But whatever, if you think that the width and height don't matter internally to the math, then yeah, it'd just be 1-whatever. 20170708 19:03:42< DeFender1031> JyrkiVesterinen, perhaps try to explain using my example of 100x200? It takes the 100x200, then performs whatever rearranding relative to 1,1, then... what? It needs to output as 200x100. How does it know to output at that size instead of the original? 20170708 19:04:01< celmin> JyrkiVesterinen: Do you think I should handle flipping and rotating in the fragment shader? 20170708 19:04:18< JyrkiVesterinen> It knows to output at 200x100 because C++ code has told it to render a 200x100 rectangle. 20170708 19:04:31< DeFender1031> okay, then that's what I was asking above when you said no. 20170708 19:04:41< DeFender1031> that makes everything MUCH simpler: 20170708 19:04:43< DeFender1031> 90 is x2=1-y1, y2=x1 20170708 19:04:44< DeFender1031> 180 is x2=1-x1, y2=1-y1 20170708 19:04:46< DeFender1031> -90 is x2=y1 y2=1-x1 20170708 19:05:14< DeFender1031> And obviously 90 and -90 flip the dimensions where 180 does not. 20170708 19:05:15< JyrkiVesterinen> I was merely saying that it does not "render and then scale". There isn't any explicit scaling step. 20170708 19:05:54< JyrkiVesterinen> celmin: If it's easier to do in the fragment shader, go ahead. The performance penalty isn't big enough to warrant making the task harder. 20170708 19:05:54< DeFender1031> JyrkiVesterinen, gotcha. I meant "scale" in terms of "render whatever is in the relative whatever in whatever way it needs to to fit the output size given". 20170708 19:09:55< DeFender1031> But anyway, the above math should make multiples of 90 more straightforward. 20170708 19:46:52-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 20:04:03-!- ToBeCloud [uid51591@wikimedia/ToBeFree] has quit [Quit: Connection closed for inactivity] 20170708 20:40:44-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has quit [Remote host closed the connection] 20170708 20:40:51-!- janebot [~Gambot@unaffiliated/gambit/bot/gambot] has joined #wesnoth-dev 20170708 20:44:53-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 20:45:26-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 21:25:07-!- JyrkiVesterinen [~JyrkiVest@85-23-197-3.bb.dnainternet.fi] has quit [Quit: .] 20170708 21:29:28-!- mjs-de [~mjs-de@x4db6d141.dyn.telefonica.de] has quit [Ping timeout: 255 seconds] 20170708 21:37:26-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 21:37:59-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 21:41:09-!- atarocch [~atarocch@93.56.160.37] has quit [Remote host closed the connection] 20170708 22:05:27-!- zookeeper [~lmsnie@wesnoth/developer/zookeeper] has quit [Ping timeout: 260 seconds] 20170708 22:31:01-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 22:31:34-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 22:41:08< celmin> …I wonder if this is why I had to negate the angle for revert. 20170708 22:41:11< celmin> ^rotate not revert 20170708 22:41:43< DeFender1031> "negate the angle"? 20170708 22:41:45< celmin> I'm using gluOrtho2D(0, 800, 600, 0) to provide a standard viewport with (0,0) at the top left. 20170708 22:42:07< celmin> Yeah, basically with the shader function, a positive angle was counter-clockwise instead of clockwise. 20170708 22:42:34< DeFender1031> hmm 20170708 22:42:39< celmin> So I'm using gluOrtho2D, but setting the texture coordinates for screen coordinate (0,0) to (0,0). 20170708 22:43:02< celmin> …though if that's wrong, shouldn't the image have rendered upside down? 20170708 22:43:05< celmin> I dunno... 20170708 22:43:07< DeFender1031> With my math you mean, or in general? 20170708 22:43:26< celmin> No, this isn't really related to your math, it's not specific to rotation (probably). 20170708 22:43:31< DeFender1031> Because if it was with my math, I did it based on the assumption that 0,0 was top-left. 20170708 22:44:13< DeFender1031> Well, either way, I suspect that it has something to do with the difference between 0,0 being top-left or bottom-left. 20170708 22:44:26< DeFender1031> anyway, I'm off for now. 20170708 22:49:40-!- RatArmy_ [~ratarmy@om126200126115.15.openmobile.ne.jp] has joined #wesnoth-dev 20170708 23:04:42-!- RatArmy_ [~ratarmy@om126200126115.15.openmobile.ne.jp] has quit [Read error: Connection reset by peer] 20170708 23:19:45-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has quit [Read error: Connection timed out] 20170708 23:20:40-!- bumbadadabum [~bumbadada@wesnoth/developer/bumbadadabum] has joined #wesnoth-dev 20170708 23:22:36-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 23:23:09-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev 20170708 23:25:46-!- RatArmy_ [~ratarmy@om126200126115.15.openmobile.ne.jp] has joined #wesnoth-dev 20170708 23:37:45-!- APic [apic@apic.name] has quit [Ping timeout: 255 seconds] 20170708 23:47:10-!- stikonas [~gentoo@wesnoth/translator/stikonas] has quit [Remote host closed the connection] 20170708 23:47:43-!- stikonas [~gentoo@wesnoth/translator/stikonas] has joined #wesnoth-dev --- Log closed Sun Jul 09 00:00:31 2017