kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
432 stars 21 forks source link

Better altitude fetches in shader #203

Closed kvark closed 2 years ago

kvark commented 2 years ago

Closes #8

The new get_surface_alt is highly optimized to only care about altitudes. It attempts to minimize the dependencies between instructions. Currently only affects regular ray tracing. Rough measurement show about 10% performance boost in ray tracing in default settings (5.5ms to 5.0ms per frame), and 25% in double-quality settings (8.3ms to 6.5ms).

kvark commented 2 years ago

Second commits actually implements the smooth sampling (possibly, wrong?) but doesn't enable it. Here is the original render: filtered-terrain-base Here is the smoothed one: filtered-terrain

kvark commented 2 years ago

Ok, that one wasn't entirely correct. Here is the fixed one: filtered-terrain