rusting_engine 2.7.0

Vulkan 3D game engine with GPU-accelerated physics for massive physics-heavy scenes
1
2
3
4
5
6
7
8
9
#rusting post 1
// Runs on the finished image, after tone mapping and color grading.
void post(PostInput i, inout vec3 color) {
#if OPT_SEPIA
    float grey = dot(color, vec3(0.299, 0.587, 0.114));
    vec3 tint = OPT_TONE == OPT_TONE_WARM ? PACK_TINT : PACK_TINT.bgr;
    color = mix(color, grey * tint, OPT_STRENGTH);
#endif
}