code logs -> 2020 -> Mon, 06 Jul 2020< code.20200705.log - code.20200707.log >
--- Log opened Mon Jul 06 00:00:20 2020
00:39 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
00:41 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
00:41 mode/#code [+o Kindamoody] by ChanServ
00:44 Kindamoody is now known as Kindamoody[zZz]
00:52 Kindamoody[zZz] [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
02:05
<~Vornicus>
ok. 1. thing to normalize look_at to something reasonable; 2. focus zoom; 3. terrain solving on CPU; 4. correct orbit and tilt to use terrain focus; 5. correct pan to clamp to terrain instead of the sea level plane below the terrain; 6. give pan "soft-clamp" mechanics so it doesn't snap so much as only accepts moves that doesn't take it further from the map; 7. make focus zoom do sort of the same thing, finding the closest on terrain
02:05
<~Vornicus>
point to zoom to.
02:08
<~Vornicus>
cameras: complicated
02:09
<&McMartin>
Quite so
02:09
<~Vornicus>
I'm enjoying myself, can you tell?
02:09
<&McMartin>
A big part of why Sable cheats like a mofo, and never lets you free-look.
02:11
<~Vornicus>
(also, something resembling something I might want to do with this is congealing in my mind but making it feel like a thing is another matter)
02:14 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
02:40 Degi [Degi@Nightstar-q0v5m2.dyn.telefonica.de] has quit [Operation timed out]
02:45 Degi [Degi@Nightstar-87mif2.dyn.telefonica.de] has joined #code
03:20
<&McMartin>
New Bumbershoot post. https://bumbershootsoft.wordpress.com/2020/07/06/directx-9-the-newest-old-thing/
03:57 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
03:59 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
06:32 Vorntastic [uid293981@Nightstar-ks9.9ff.184.192.IP] has joined #code
06:32 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
06:52 celticminstrel [celticminst@Nightstar-79nr02.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:49 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
08:50 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
09:08 Kindamoody[zZz] [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
09:08 mode/#code [+o Kindamoody[zZz]] by ChanServ
09:09 Kindamoody[zZz] is now known as Kindamoody
09:16 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
09:36 Omega [Alek@Nightstar-kaiguq.il.comcast.net] has joined #code
09:36 mode/#code [+o Omega] by ChanServ
09:37 Alek [Alek@Nightstar-kaiguq.il.comcast.net] has quit [Ping timeout: 121 seconds]
09:43 macdjord is now known as macdjord|slep
10:24 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Connection closed]
10:26 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
10:58 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
10:58 mode/#code [+o Kindamoody] by ChanServ
11:24 catalyst [catalyst@Nightstar-avegqs.dab.02.net] has joined #code
11:27 catalyst_ [catalyst@Nightstar-v6lb30.cable.virginm.net] has quit [Ping timeout: 121 seconds]
11:49 catalyst is now known as catralyst
11:58 VirusJTG_ [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
11:59 VirusJTG_ [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed]
12:01 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Ping timeout: 121 seconds]
12:19 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
12:32 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
12:32 mode/#code [+o Kindamoody] by ChanServ
12:47 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
12:49
<&ToxicFrog>
Oh, this will be interesteing.
12:54
<@TheWatcher>
What's that?
12:56 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
12:56 mode/#code [+o Kindamoody] by ChanServ
13:00 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
13:00 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
13:47
<&ToxicFrog>
TheWatcher: &McMartin | New Bumbershoot post. ยน https://bumbershootsoft.wordpress.com/2020/07/06/directx-9-the-newest-old-thing/
13:48
<&ToxicFrog>
I forget that not everyone filters out join/part, apparently that was like a page and a half ago~
13:50
<@TheWatcher>
Aaaah :)
13:51
<~Vorntastic>
I have to say, working in shaders has been way less annoying than what it looks like legacy work would have been. Something something do anything instead of everything.
14:02 celticminstrel [celticminst@Nightstar-79nr02.dsl.bell.ca] has joined #code
14:02 mode/#code [+o celticminstrel] by ChanServ
15:01
<&[R]>
https://i.imgur.com/g5MswBc.png
15:03 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:03 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:07 Kindamoody is now known as Kindamoody|afk
15:11
<&ToxicFrog>
thanks i hate it
15:11
<&[R]>
Yeah
15:16 Kindamoody|afk [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
15:21
<@sshine>
here's an interesting problem (to me):
15:21
<@sshine>
The Ethereum VM's EXP opcode, like the rest of its arithmetic opcodes, has no overflow detection. this can be a big problem because modular semantics would often be wrong.
15:22
<@sshine>
so people come up with alternatives that are safer (throw on overflow). the best alternative to EXP is a O(lg n) pow() that uses the squaring technique.
15:23
<@sshine>
I'm thinking: is there really no way to detect if an EXP resulted in an overflow?
15:23
<@sshine>
if this check is cheaper than O(lg n) multiplications, this is better.
15:24
<@sshine>
so the typical overflow is like this: mul(uint x, uint y) => require(y == 0 || (z = x * y) / y == x);
15:25
<@sshine>
overflow check*
15:25
<~Vornicus>
discrete logarithm is hard
15:25
<@sshine>
another overflow check is like this: add(uint x, uint y) => require((z = x + y) >= x);
15:25
<@sshine>
Vornicus, what do you mean?
15:26
<@sshine>
ah, yeah, I think we're venturing into some discrete math / algebra territory where I'm not terribly familiar. :)
15:26
<~Vornicus>
unlike addition or multiplication, reversing an exponentiation operation has very high computational complexity
15:26
<@sshine>
I suppose this is what elliptic curve cryptography abuses?
15:26
<~Vornicus>
yes
15:27
<~Vornicus>
but, uh
15:28
<@sshine>
but I'm only interested in whether it overflows, not the actual result. it just seems that the actual result would be a path to the former.
15:28
<~Vornicus>
what the fuck are they doing where there's no overflow detection and -- worse, since this is a thing where crypto *exists as a thing* they don't have a powmod operator that actually fucking works
15:28
<@sshine>
haha yes
15:28
<@sshine>
good effing question.
15:28
<@sshine>
I think the honest truth is that Ethereum VM is mostly a research project. :)
15:28
<@sshine>
they got popular and now they can't change basic semantics. modular arithmetic is super neat for implementing, bad for using.
15:29
<~Vornicus>
Now this all said, if you know your word size you can do the math reasonably quickly to find the thresholds where overflow would occur
15:30
<@sshine>
the word-size is fixed to 256 bits.
15:30
<@sshine>
since overflow depends on both the base and the exponent, aren't there multiple thresholds?
15:31
<~Vornicus>
right, you get a base threshold for each exponent.
15:32
<@sshine>
ah, so fixing one, calculate the threshold for the other.
15:33
<@sshine>
https://ethereum.stackexchange.com/a/84809/7155 -- maybe this is what this guy proposes. count if the base bits might cause overflow. but this is O(n), so since EXP, MUL and ADD cost the same, a O(lg n) MUL solution is still better than a O(n) ADD solution, I think...
15:35 * TheWatcher readsup, eyes [R]'s image
15:36
<@TheWatcher>
...
15:36
<@TheWatcher>
Why. Why would you do that?!
15:37
<&[R]>
Probably the same reason people thought that emoticons were a good idea
15:49
<~Vornicus>
right. 256 bit signed integers overflow at 2^255, 3^161, 4^128, 5^110, 6^99, 91 85 81 77 74 72 69 67 66 64 63 62 61 60 59 58 57 56 55 54 53 52 ... at this point the base is at 30 and the exponent is now going down less than 1 per step: 30^52, 32^51, 35^50, 37^49, 40^48, 43^47, 47^46, 51^45, 56^44, 61^43, 68^42
15:52
<~Vornicus>
you can compute the two halves of this manually (using any big integer library you want, I just grabbed python) and import it
15:53
<~Vornicus>
--also.
15:54
<~Vornicus>
the modulus here is *not prime* and your overflow checker can fail.
15:56
<~Vornicus>
for multiplication that is.
15:58
<~Vornicus>
to be specific: in, 4 bit signed integers, 6 * 5 = 6 % 6 = 0
15:59
<~Vornicus>
(wrong one hang on)
16:03
<~Vornicus>
oh there they are. ok. 6 * -7 = 6
16:11 Omega [Alek@Nightstar-kaiguq.il.comcast.net] has quit [Ping timeout: 121 seconds]
16:17
<~Vornicus>
and I forgot you said round tripping instead of modulus so forget that
16:37 catralyst [catalyst@Nightstar-avegqs.dab.02.net] has quit [Ping timeout: 121 seconds]
17:02 Vorntastic [uid293981@Nightstar-ks9.9ff.184.192.IP] has quit [[NS] Quit: Connection closed for inactivity]
17:11 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
17:12 Kindamoody|afk [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
17:12 mode/#code [+o Kindamoody|afk] by ChanServ
17:14 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
17:14 mode/#code [+o Reiv] by ChanServ
17:14 Kindamoody|afk is now known as Kindamoody
18:11 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
18:25 Alek [Alek@Nightstar-kaiguq.il.comcast.net] has joined #code
18:25 mode/#code [+o Alek] by ChanServ
19:30 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
19:30 mode/#code [+o Kindamoody] by ChanServ
19:38 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
20:41
<&McMartin>
07:28 <~Vornicus> what the fuck are they doing where there's no overflow detection and -- worse, since this is a thing where crypto *exists as a thing* they don't have a powmod operator that actually fucking works
20:41
<&McMartin>
07:28 <@sshine> I think the honest truth is that Ethereum VM is mostly a research project. :)
20:41
<&McMartin>
I think the even more honest answer is "crypto is broadly speaking a scam from top to bottom"
20:42
<&McMartin>
05:51 <~Vorntastic> I have to say, working in shaders has been way less annoying than what it looks like legacy work would have been. Something something do anything instead of everything.
20:42
<&McMartin>
I never actually got good enough with pre-shader 3D tech to actually get mathematical texture combinators to work
20:43
<&McMartin>
I don't really intend to do so for this~
20:44
<&McMartin>
The other part of selecting DX9 for this is that it's roughly equivalent to OpenGL 2.1. If you want to do that kind of thing in DX9, like OGL2, you don't do it with precomputed bump maps and weird chains of texture blending
20:44
<&McMartin>
You... write a shader for that part. The difference is that you don't get to/have to use the shader for *literally everything*.
20:49
<&McMartin>
Multitexturing is a dead tech I'm mostly not interested in. :)
20:51
<&McMartin>
I'd be happy to *read* about, say, what exactly Jet Set Radio did to get cel shading out of a Dreamcast.
20:51
<&McMartin>
But I'm not qualified to research it on my own, nor am I particularly qualified to write the article based on someone else's research.
20:53
<&McMartin>
The only thing about it I have any confidence in is "I am generally aware that once you squint hard enough, multitexturing operations become isomorphic to shader-assembly instructions", but the only reason I have any confidence in it is because it's part of the history in that McKesson tutorial I link...
20:54
<&McMartin>
... and because I've seen the requirements that pre-9 versions of D3D put on their shaders, and it's pretty obvious that the shader assembly language is an alternate wrapper over hardware that was designed to combine textures at fill time.
20:54
<&McMartin>
You'd see restrictions like "your shader is limited to five arithmetic operations and two conditional checks"
20:57 * Vornicus looks over at his shader code, 181 lines long
21:01
<&McMartin>
Yep, you won't be running that on a GeForce 3.
21:03
<&McMartin>
And yeah, this big from that Modern GL tutorial is why I don't feel like I'm going to bother going pre-9:
21:03
<&McMartin>
"However, the D3D 8.0 pixel shader pipeline was nothing more than NVIDIA's register combiners and texture shaders. There was no real abstraction of capabilities; the D3D 8.0 pixel shaders simply took NVIDIA's hardware and made a shader language out of it."
21:03
<&McMartin>
"To provide support for the 8500's expanded fragment processing feature-set, there was D3D 8.1. This version altered the pixel shader pipeline to match the capabilities of the Radeon 8500. Fortunately, the 8500 would accept 8.0 shaders just fine, since it was capable of doing everything the GeForce 3 could do. But no one would mistake either shader specification for any kind of real abstraction."
21:03
<&McMartin>
"Things were much worse on the OpenGL front. At least in D3D, you used the same basic C++ API to provide shaders; the shaders themselves may have been different, but the base API was the same. Not so in OpenGL land."
21:04
<&McMartin>
D3D 8 and 8.1 were essentially each abstractions around one specific graphics card's capabilities.
21:04
<&McMartin>
That this provided actual value just makes it all worse~
21:05
<~Vornicus>
damn
21:05
<&McMartin>
Though that it provided actual value is in some sense unsurprising from here
21:06
<&McMartin>
The conversion from those code-like specifications of how to set up the register combiners and texture shaders translate immediately a sequence of GPU instructions for a fully programmable modern shader.
21:06
<&McMartin>
So now those are just Really Short Shader Programs.
21:09
<&McMartin>
https://paroj.github.io/gltut/History%20of%20Graphics%20Hardware.html is a very good read
21:10
<&McMartin>
And opens with "For those of you had the good fortune of not being graphics programmers during the formative years of the development of consumer graphics hardware, what follows is a brief history."
21:13
<~Vornicus>
augh and then I need to all these other things and I keep flopping between them fuuu
21:17
<~Vornicus>
The camera is getting more complicated; I thus should farm it off into its own file. I shouldn't be doing direct control reading there for maintainability reasons; I thus should be doing the control reading in another place and passing in the result of the control reading.
21:19
<~Vornicus>
I forgot to include framerate-sensitivity in the camera controls, so I need to mess with that too.
21:20
<~Vornicus>
And I need to farm individual camera control functions into their own thing, which means a command structure in the camera.
21:21
<~Vornicus>
And I need a bunch of CPU-side equivalents to glsl functions, which my vector library doesn't currently provide and anyway I wanted to actually contribute to this thing
21:21
<~Vornicus>
And ... ...yeah.
21:50
<&McMartin>
What is the thing that you are using and to which you intend to contribute?
21:54
<~Vornicus>
MGL, a quite new vector library for lua. unlike some other libraries (I'm looking at you, cpml) it actually bothers including proper support for vec4s
21:55
<~Vornicus>
and non-square matrices which i use reasonably often
22:07 Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code
22:07 mode/#code [+o Kindamoody] by ChanServ
22:20 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed]
22:20 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
22:20 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
22:42 Alek [Alek@Nightstar-kaiguq.il.comcast.net] has quit [Ping timeout: 121 seconds]
22:46
<~Vornicus>
Ok. input checking loop done, now use that in the thing...
22:46 Alek [Alek@Nightstar-kaiguq.il.comcast.net] has joined #code
22:46 mode/#code [+o Alek] by ChanServ
23:01
<~Vornicus>
Now turn the camera into a full object as opposed to a bare table that i have to hunt down every time.
23:12 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
--- Log closed Tue Jul 07 00:00:22 2020
code logs -> 2020 -> Mon, 06 Jul 2020< code.20200705.log - code.20200707.log >

[ Latest log file ]