Conversation
|
|
||
| rayAccel = normalize(gravityVector) * gravity / (rayDistance * rayDistance); | ||
| //rayAccel = normalize(gravityVector) * gravity / (rayDistance * rayDistance); | ||
| rayAccel = normalize(gravityVector) * schwarzschildRadius*schwarzschildRadius/1.04976E9 / (rayDistance * rayDistance); |
There was a problem hiding this comment.
I'd suggest precomputing this value before passing it to the shader.
Also there is now blackHoleRadius and schwarzschildRadius, what's the difference between both? Can one be expressed in terms of the other?
Also remove the gravity parameter if it's no longer used
There was a problem hiding this comment.
In v0.994, I switched back to gravity in the shader. Now gravity can be pre-computed using schwarzschildRadius.
blackHoleRadius is used in the original code. It's the scaled space radius of the black hole and equals to schwarzschildRadius/6000. schwarzschildRadius functions as an alternative to gravity, which equals the actual Schwarzschild radius in meters.
There was a problem hiding this comment.
Makes sense, I just didn't want there to be multiple radius variables in the shader code. So schwarzschildRadius is basically just the radius in local space units but exposed to the user? Sounds good.
The Doppler effect is added mainly by modifying the function:
float3 accretionDiskColor(float3 pos, float3 base1, float3 base2, float3 blackHoleOrigin)inBlackHoleAccretionDisk.shader.The Doppler effect is tweakable by adjusting four configurable parameters added: