code logs -> 2019 -> Wed, 11 Sep 2019< code.20190910.log - code.20190912.log >
--- Log opened Wed Sep 11 00:00:24 2019
00:33 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code
00:33 mode/#code [+o himi] by ChanServ
00:52 * Derakon stares at this shader.
00:53
<&Derakon>
Let's say I want a texture sampling effect to fade out towards the edges of the texture, because it's smaller than the object it's being applied to and I don't want to get the unrealistic clamping/repeating/etc. effects that you get when off the edge of the texture.
00:53
<&Derakon>
So I have rippleUV which is an X/Y pair each in the range [0..1].
00:53
<&Derakon>
So I do:
00:53
<&Derakon>
float dx = 2 * (rippleUV.x - .5); // Range 0-1
00:53
<&Derakon>
float dy = 2 * (rippleUV.y - .5); // Range 0-1
00:53
<&Derakon>
float distSq = (dx * dx) + (dy * dy); // Range 0-2
00:53
<&Derakon>
float rippleScale = 1 - (distSq / 2); // Range 0-1
00:53
<&Derakon>
And then multiply my texture effect by rippleScale.
00:54
<&Derakon>
With the idea being that rippleScale should be 0 when rippleUV is near 0 or 1 for either X or Y, and 1 when they're both at 0.5.
00:54
<&Derakon>
Any errors in my math? Because it's not working.
00:56
<~Vornicus>
dx is -1 to 1
00:57
<~Vornicus>
similarly dy
00:57
<&Derakon>
...yeah, and dividing by 2 isn't really valid to rescale distSq.
00:57
<&Derakon>
Because I want the scale to be 0 if dx = 1 and dy = 0, for example.
00:58
<&Derakon>
This seems OK:
00:58
<&Derakon>
float dx = 2 * (rippleUV.x - .5); // Range -1 to 1
00:58
<&Derakon>
float dy = 2 * (rippleUV.y - .5); // Range -1 to 1
00:58
<&Derakon>
float distSq = (dx * dx) + (dy * dy); // Range 0-2
00:58
<&Derakon>
float rippleScale = saturate(1 - sqrt(distSq)); // Range 0-1
00:58
<&Derakon>
(`saturate` is a shader function that clamps to the range [0..1])
00:59
<~Vornicus>
with the caveat that it will now look clearly conical
00:59
<&Derakon>
I'm not a fan of the sqrt but I don't actually know how big a deal it is.
00:59
<&Derakon>
Conical isn't ideal but I doubt it'll be noticeable.
01:03
<&Derakon>
What I'm working on is having ships create wakes, by distorting the water using a special texture.
01:03
<&Derakon>
So imagine all of the water off the edge of the texture in a particular direction getting distorted.
01:03
<&Derakon>
It looked weird.
01:13 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
01:57 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has quit [Connection closed]
02:35 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has joined #code
02:35 mode/#code [+o celticminstrel] by ChanServ
02:48
<@Reiv>
snrk
03:04 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Connection closed]
03:19 macdjord [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
03:19 mode/#code [+o macdjord] by ChanServ
03:40
< Pink>
What sort of mesh are you putting it on?
03:44
< Pink>
In my own ripple thing I just vignetted the distortion texture. Probably not as performant, but much easier.
03:45
< Pink>
Though not sure I'd do that if I recreated it now
04:02 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
04:29 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
04:29 mode/#code [+o Reiv] by ChanServ
04:42
<&Derakon>
Pink: the ocean mesh is, uh, 326k tris, and then tessellated on top of that.
04:42
<&Derakon>
Fair point on the vignetting, oh well.
04:53 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
04:59
<@Alek>
Derakon, if you want a little more realism, you might want to base the angle and length of the wake on the speed of the boat and the angle of its prow, which I believe are what affect it IRL. should, in theory, be a simple matter of deforming the texture appropriately...
05:00 * Alek shrugs.
05:05
<&Derakon>
Alek: yeah, that's planned. Just a matter of fine-tuning.
05:27 Derakon is now known as Derakon[AFK]
05:47 Kindamoody[zZz] is now known as Kindamoody
07:04
<@Alek>
cool
07:12 * McMartin starts attempting to break Xcode in earnest
07:55 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Connection closed]
09:19 Degi [Degi@Nightstar-7g33ic.dyn.telefonica.de] has joined #code
09:37 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
09:37 mode/#code [+qo Vornicus Vornicus] by ChanServ
10:15
<~Vornicus>
Ok. In order for this to work, I have to force a swap, and then reset the swap targets.
10:16
<~Vornicus>
the forced swap is on the longer of two finite lines on a finite degenerate triangle that are attached to the new point.
10:19 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has joined #code
10:43 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
10:43 mode/#code [+o himi] by ChanServ
11:32 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
11:32 mode/#code [+o mac] by ChanServ
11:35 macdjord [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
11:52
<~Vornicus>
In order to make this work I thus have to check - before doing any attempted corrections - that I'm actually in the special case here
12:12 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
12:12 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
12:12 mode/#code [+o mac] by ChanServ
13:56
<@abudhabi>
Sweet. New work laptop GET.
13:56
<@abudhabi>
Now to copy the 79 GB virtual box on it.
13:57
<@abudhabi>
Fortunately, I had a spare wired switch, so it'll only take a couple hours.
14:35
<@abudhabi>
Good thing WinSCP supports resuming...
14:35
<@abudhabi>
...because FUCKING WINDOWS decided it was the right time to reboot without permission, probably to install some bullshit update since it detected that I wasn't actively mouseclicking anymore.
15:48 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has joined #code
15:48 mode/#code [+o celticminstrel] by ChanServ
16:02 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
16:04 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
16:31 Degi [Degi@Nightstar-7g33ic.dyn.telefonica.de] has quit [Connection reset by peer]
16:49 Derakon[AFK] is now known as Derakon
16:58 Mango [Frankie_Boy@Nightstar-hqmi86.abhsia.telus.net] has joined #code
16:58 * Mango waves to the room.
16:59
< Mango>
Is there any way to write an extension for Firefox or Chrome that causes YouTube to full screen to a specific monitor?
16:59
< Mango>
Use case: we want to cue a video on the laptop's internal display, but have it full screen to a projector, without having the audience see us drag the window up there.
17:04 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
17:06 Vorntastic [uid293981@Nightstar-2dc.p8m.184.192.IP] has joined #code
17:06 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
17:07
<&jeroud>
Aaaaaaaaaaaaaaaaaaaaaaaaaa!
17:07 * jeroud takes a breath.
17:08
<&jeroud>
Aaaaaaaaaaaaaaaaaaaaaaaaaa!
17:08
<~Vorntastic>
?????
17:08
<&jeroud>
This panicking brought to you by the last several times I've tried to do anything with browser extensions.
17:09 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
17:10
<&jeroud>
Vorntastic: I'd paste Mango's question, but I'm on my phone which makes it much more difficult. Sorry.
17:10
<~Vorntastic>
I saw it
17:10 * Mango hugs jeroud
17:11
<&jeroud>
Mango: If you have the projector set as the primary display, clicking the fullscreen button on the video might do it.
17:11
<~Vorntastic>
Was looking up windows shortcuts for moving windows around but the specific one I wanted wasn't there
17:11 * Mango has never written a browser extension before.
17:11
<&jeroud>
At least, it does that for me on OSX.
17:11
<~Vorntastic>
It does not on Windows, instead full-screening where it is
17:12
< Mango>
Vorntastic: You gave me an idea. I wonder if I could use AutoHotkey to detect that a YouTube video was full scrren.
17:12 * Mango Googles
17:12
<&jeroud>
Maybe use youtube-dl to turn it into a local video file?
17:12
< Mango>
Unfortunately it's a live stream.
17:12
< Mango>
"Unfortunately" for many reasons.
17:13
< Mango>
This is just one of them.
17:59
<@abudhabi>
Hm. I'm connecting two PCs (win10 and mint) via a wired switch. But I'm unimpressed by the upload speed - it's like 11.4 MB/s. This seems a bit low.
17:59
<@abudhabi>
Why might this be?
18:00
<@abudhabi>
Both machines have modern disks.
18:00
<@abudhabi>
(HDDs.)
18:06
<@abudhabi>
The switch, perhaps?
18:11
<@abudhabi>
100 Mb/s is 12.5 MB/s, after all.
18:28
<&jeroud>
100Mbps network seems likely.
18:28
<&jeroud>
But disks can also be slow.
18:29
<&jeroud>
Especially if they're spinning rust and there's lots of fragmentation.
18:35
<@abudhabi>
Not likely. One is a month old, the other might be used, I don't know, but it has a new system after a wipe on it.
19:25 Vorntastic [uid293981@Nightstar-2dc.p8m.184.192.IP] has quit [[NS] Quit: Connection closed for inactivity]
19:49 Pinkhair is now known as Pink
21:04 Vorntastic [uid293981@Nightstar-2dc.p8m.184.192.IP] has joined #code
21:04 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
21:38
<@Alek>
100Mbps switch seems the likely answer, then.
21:38
<@Alek>
or a 100Mbps port on one of the machines. not everything, even new, has a gigabit port yet.
21:45 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [[NS] Quit: brb]
21:51 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code
21:51 mode/#code [+o Alek] by ChanServ
22:18 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
22:32 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
22:32 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:49 Kindamoody is now known as Kindamoody[zZz]
22:53 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
--- Log closed Thu Sep 12 00:00:26 2019
code logs -> 2019 -> Wed, 11 Sep 2019< code.20190910.log - code.20190912.log >

[ Latest log file ]