#include "r_local.h"
Go to the source code of this file.
Functions | |
void | R_CreateSurfaceFlare (mBspSurface_t *surf) |
void | R_DrawFlareSurfaces (mBspSurfaces_t *surfs) |
Flares are batched by their texture. Usually, this means one draw operation for all flares in view. Flare visibility is calculated every few millis, and flare alpha is ramped up or down depending on the results of the visibility trace. Flares are also faded according to the angle of their surface to the view origin. |
void R_CreateSurfaceFlare | ( | mBspSurface_t * | surf | ) |
Definition at line 24 of file r_flare.c.
References mBspSurface_s::center, mBspSurface_s::color, mBspFlare_s::color, materialStage_s::color, materialStage_s::flags, material_s::flags, mBspSurface_s::flare, materialStage_s::image, mBspFlare_s::image, mBspTexInfo_s::image, m, image_s::material, mBspSurface_s::maxs, Mem_PoolAlloc, mBspSurface_s::mins, materialStage_s::next, mBspSurface_s::normal, mBspFlare_s::origin, mBspFlare_s::radius, scale_s::s, materialStage_s::scale, STAGE_COLOR, STAGE_FLARE, STAGE_SCALE_S, STAGE_SCALE_T, material_s::stages, scale_s::t, mBspSurface_s::texinfo, VectorCopy, VectorLength(), VectorMA(), VectorSubtract, and vid_modelPool.
Referenced by R_CreateMaterialData_().
void R_DrawFlareSurfaces | ( | mBspSurfaces_t * | surfs | ) |
Flares are batched by their texture. Usually, this means one draw operation for all flares in view. Flare visibility is calculated every few millis, and flare alpha is ramped up or down depending on the results of the visibility trace. Flares are also faded according to the angle of their surface to the view origin.
Definition at line 72 of file r_flare.c.
References mBspFlare_s::alpha, entity_s::alpha, mBspFlare_s::color, rstate_t::color_array, mBspSurfaces_s::count, default_texcoords, DotProduct, f, mBspSurface_s::flare, trace_s::fraction, rlocals_s::frame, mBspSurface_s::frame, i, mBspFlare_s::image, cvar_s::integer, m, MASK_SOLID, mBspSurface_s::normal, mBspFlare_s::origin, qfalse, qtrue, R_BindTexture, R_Color(), R_EnableColorArray(), r_flares, r_flaretextures, r_locals, R_ResetArrayState(), r_state, R_Trace(), mBspFlare_s::radius, refdef, rlocals_s::right, right, scale, mBspSurfaces_s::surfaces, image_s::texnum, texunit_diffuse, mBspFlare_s::time, rendererData_t::time, rendererData_t::trace, rlocals_s::up, cvar_s::value, VectorAdd, VectorNormalize(), VectorScale, VectorSubtract, rstate_t::vertex_array_3d, and rendererData_t::viewOrigin.
Referenced by R_DrawBspModelSurfaces(), and R_RenderFrame().