Giter VIP home page Giter VIP logo

e1338's People

Contributors

madjestic avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

e1338's Issues

Move camera, perspective, transform matrix composition from GPU to CPU.

Why?
The reason is that every time we do a computation in 32bits Float (GPU),
we are losing precision.  CPU is 64bit Double.  Since we are dealing
with relativistic distances, we can have very larger values in matrices,
everything right in front of the camera can be very, very far away,
e.g. millions or hundreds of millions km away, or billions or hundreds
billions of meters, i.e. values like 10^(6..11).
 
At the same time, objects of the order of magnitude of 10^(1..10)m.
can be at a distance of just 10^(0..10)m.  I.o.w. our transform matrices
can have values with a large number of values either before, or behind
a dot, or both.  E.g. 9,999,999,999; 0.99; 150.99.
When multiplying such matrices, especially rotations, precision will suffer,
values after the dot may be culled or lost altogether,
partial values approaching integers, which will lead to artifacts,
especially when dealing with thin objects: faces on one side can visually
intersect faces of the opposite side, positions can be generally deformed
with visible imprecisions, z-fighting, etc.

Introducing logarithmic space correction in 32bits precision can only
make such artifacts worse.  On the contrary, if precision is preserved,
logarithmic space correction should help with rendering thin objects 
in coordinates with relativistic distances close to the camera.
 
Solution: do as little matrix math on the GPU side as possible,
only when precision loss is not an issue, move it to CPU side instead.
  
Drawbacks: it's extra work for CPU.
Addressing Drawbacks: high-performance tools, such as massiv, may
give enough performance with added benefit of high precision.

optimize the geo indexer

At the moment the conversion of geo with 90K points takes more than 10 hours, that is excluding reshuffle. That is probably due to working with String data (90K points become one very long String).

TODO:

  1. Run ./app/geoIndexerNP.hs through the profiler, identify the bottle necks.
  2. Optimize

add multiple cameras and switching

The app should support multiple cameras with a camera-switching mechanics.

  1. Cameras should be an list.
  2. Hitting some key should switch the current view to a camera from a list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.