Synodic-Software / Soul-Engine

Physically based renderer and simulation engine for real-time applications.
GNU General Public License v3.0
42 stars 24 forks source link

Buffer Indexed Reads #58

Open Behemyth opened 7 years ago

Behemyth commented 7 years ago

TODOs in 'CameraManager.cpp'

The GPUBuffer object should have the option to intercept any read or write operations. As they are all internally represented as a 1D array, the ability to interface the data with a arbitrary pattern is useful for a good deal of things. For example, all the ray data is stored in a GPUBuffer. Memory coherency could be increased if all spatially similar indices on a 2D representation (lets say n, n+1, n+21, n+ 531, n + 532) were located next to each other in memory. Thus, bugger[0] would read a different value depending on a pattern/pre-processing step