Basic support for regional color grading

Gaming / Game Engines / Unvanquished - Matthias Bentrup [googlemail.com] - 11 May 2013 04:00 UTC

A color grading region can be defined by a func_static entity with the gradingTexture property. The intensity of the grading depends on the distance between the camera and any brush of the entity, inside the entity it is always 1, and it decreases linearly to 0 at distance gradingDistance.

The grading entity can be built entirely from hint brushes, they have no effect on the compiled map, and its brushes shouldn't be too complex as the distance calculation has to be repeated every frame.

23cd286 Basic support for regional color grading.
src/engine/client/cg_api.h | 5 ++-
src/engine/client/cl_cgame.c | 3 ++
src/engine/qcommon/cm_public.h | 2 ++
src/engine/qcommon/cm_trace.c | 58 +++++++++++++++++++++++++++++++++
src/gamelogic/cgame/cg_api.asm | 1 +
src/gamelogic/cgame/cg_api.c | 5 +++
src/gamelogic/cgame/cg_local.h | 4 ++-
src/gamelogic/cgame/cg_main.c | 47 ++++++++++++++++-----------
src/gamelogic/cgame/cg_servercmds.c | 3 +-
src/gamelogic/cgame/cg_view.c | 60 ++++++++++++++++++++++++++++++++++-
src/gamelogic/game/g_spawn.c | 4 +--
src/gamelogic/game/g_spawn_mover.c | 12 +++++++
12 files changed, 179 insertions(+), 25 deletions(-)

Upstream: github.com


  • Share