i nerd sniped myself tonight and i imagine the NSA operative who is assigned to me is very confused by the increasingly erratic and frustrated google searches for HOW DO I CALCULATE THE MOON WHERE IS THE MOON
-
@aeva @jon_valdes alright I think we just use data from sdss and reproject it for alpha centuri, blindly extrapolating for the correct date using the star velocity. so no complex orbital mechanics. However for the planetary bodies in solar system we use code derived from https://stjarnhimlen.se/comp/ppcomp.html
Word of caution about calculating these things on the GPU: implementations of trigonometric functions on the GPU are less accurate than you'd hope, and if you calculate a bunch of sin() and cos() for your view direction per pixel, they turn out not to be accurate enough for stable movement across a 60° fov on a 4K screen. Particularly Intel, which seems to barely pass the D3D precision requirements there...
-
Word of caution about calculating these things on the GPU: implementations of trigonometric functions on the GPU are less accurate than you'd hope, and if you calculate a bunch of sin() and cos() for your view direction per pixel, they turn out not to be accurate enough for stable movement across a 60° fov on a 4K screen. Particularly Intel, which seems to barely pass the D3D precision requirements there...
@jon_valdes @aeva right, yeah I should also mention all that is done on the cpu, and with double precision. I'm not really sure if you can even squeeze it to work with f32.
-
@jon_valdes @aeva right, yeah I should also mention all that is done on the cpu, and with double precision. I'm not really sure if you can even squeeze it to work with f32.
-
@jon_valdes @dotstdy blessedly I'm planning on doing this on the cpu, but
-
@jon_valdes @dotstdy blessedly I'm planning on doing this on the cpu, but
-
@jon_valdes @dotstdy my laptop has a recent-ish Xe gpu
-
@jon_valdes @dotstdy my laptop has a recent-ish Xe gpu
@jon_valdes @dotstdy it's bizarre seeing my 10 year old telephone's mali do better at... anything at all
-
@jon_valdes @dotstdy it's bizarre seeing my 10 year old telephone's mali do better at... anything at all
@jon_valdes @dotstdy though I guess the corner the intel case is cutting is where the slope starts to level out so I guess that makes sense. are CPU trig functions just as bad?
-
@jon_valdes @dotstdy though I guess the corner the intel case is cutting is where the slope starts to level out so I guess that makes sense. are CPU trig functions just as bad?
@jon_valdes @dotstdy would mollytime get a warmer, fuller sound if i switched to expensive software sine waves :3
-
@jon_valdes @dotstdy would mollytime get a warmer, fuller sound if i switched to expensive software sine waves :3
@aeva @jon_valdes generally cpu trig is not so bad, but does vary between platforms if you're just calling the c stdlib functions (but we're talking differences of 1 ulp or so). so yes, absolutely you can get a warmer fuller soundstage by switching to a different sin.
-
@jon_valdes @dotstdy my laptop has a recent-ish Xe gpu
-
-
@aeva @jon_valdes generally cpu trig is not so bad, but does vary between platforms if you're just calling the c stdlib functions (but we're talking differences of 1 ulp or so). so yes, absolutely you can get a warmer fuller soundstage by switching to a different sin.
@dotstdy @jon_valdes maybe I'll call the expensive exact soft sin oscillator "gold plated sin"
-
@dotstdy @jon_valdes maybe I'll call the expensive exact soft sin oscillator "gold plated sin"
@aeva @dotstdy @jon_valdes start a new genre "deca-dance"
-
@aeva @dotstdy @jon_valdes start a new genre "deca-dance"
@demofox @dotstdy @jon_valdes well so far I can't tell the difference by ear between the soft sin and the double precision sin that clang gives me
-
@demofox @dotstdy @jon_valdes well so far I can't tell the difference by ear between the soft sin and the double precision sin that clang gives me
@demofox @dotstdy @jon_valdes assuming I didn't screw anything up adapting Jon's shader toy, the 30 iteration soft sin also has the surprising property of being able to clip out of the expected -1.0 to 1.0 output range https://github.com/Aeva/mollytime/blob/af58e9237903856b6193a116ae6408038dc47d4a/src/patch.cpp#L319
-
@demofox @dotstdy @jon_valdes assuming I didn't screw anything up adapting Jon's shader toy, the 30 iteration soft sin also has the surprising property of being able to clip out of the expected -1.0 to 1.0 output range https://github.com/Aeva/mollytime/blob/af58e9237903856b6193a116ae6408038dc47d4a/src/patch.cpp#L319
@aeva @demofox @dotstdy @jon_valdes There's lots of versions of CPU sin/cos as well. The fastest is basically identical to the GPU one - about 12 bits of precision, IIRC. Then they do iteration internally if you want higher precision. There's no magic - everything costs!
As you noticed, sometimes it's better not to call sin-vs-cos, because you're not guaranteed to get magnitude 1.0. In those cases it's better to get sin and derive the other by doing sqrt(1-sin^2).
-
@aeva @demofox @dotstdy @jon_valdes There's lots of versions of CPU sin/cos as well. The fastest is basically identical to the GPU one - about 12 bits of precision, IIRC. Then they do iteration internally if you want higher precision. There's no magic - everything costs!
As you noticed, sometimes it's better not to call sin-vs-cos, because you're not guaranteed to get magnitude 1.0. In those cases it's better to get sin and derive the other by doing sqrt(1-sin^2).
@aeva @demofox @dotstdy @jon_valdes Also, if you care about precision at all, do range reduction yourself beforehand. Otherwise you have no idea how it's being done internally.
-
@aeva @demofox @dotstdy @jon_valdes Also, if you care about precision at all, do range reduction yourself beforehand. Otherwise you have no idea how it's being done internally.
@TomF @demofox @dotstdy @jon_valdes I already do the range reduction. I learned that the hard way once upon a time XD