5 extern cvar_t r_shadow_bumpscale_basetexture;
6 extern cvar_t r_shadow_bumpscale_bumpmap;
7 extern cvar_t r_shadow_cull;
8 extern cvar_t r_shadow_debuglight;
9 extern cvar_t r_shadow_gloss;
10 extern cvar_t r_shadow_gloss2intensity;
11 extern cvar_t r_shadow_glossintensity;
12 extern cvar_t r_shadow_lightattenuationpower;
13 extern cvar_t r_shadow_lightattenuationscale;
14 extern cvar_t r_shadow_lightintensityscale;
15 extern cvar_t r_shadow_portallight;
16 extern cvar_t r_shadow_projectdistance;
17 extern cvar_t r_shadow_realtime_dlight;
18 extern cvar_t r_shadow_realtime_dlight_shadows;
19 extern cvar_t r_shadow_realtime_world;
20 extern cvar_t r_shadow_realtime_world_dlightshadows;
21 extern cvar_t r_shadow_realtime_world_lightmaps;
22 extern cvar_t r_shadow_realtime_world_shadows;
23 extern cvar_t r_shadow_scissor;
24 extern cvar_t r_shadow_shadow_polygonfactor;
25 extern cvar_t r_shadow_shadow_polygonoffset;
26 extern cvar_t r_shadow_singlepassvolumegeneration;
27 extern cvar_t r_shadow_staticworldlights;
28 extern cvar_t r_shadow_texture3d;
29 extern cvar_t r_shadow_visiblevolumes;
30 extern cvar_t gl_ext_stenciltwoside;
32 extern mempool_t *r_shadow_mempool;
34 void R_Shadow_Init(void);
35 void R_Shadow_VolumeFromList(int numverts, int numtris, const float *invertex3f, const int *elements, const int *neighbors, const vec3_t projectorigin, float projectdistance, int nummarktris, const int *marktris);
36 void R_Shadow_MarkVolumeFromBox(int firsttriangle, int numtris, const float *invertex3f, const int *elements, const vec3_t projectorigin, const vec3_t lightmins, const vec3_t lightmaxs, const vec3_t surfacemins, const vec3_t surfacemaxs);
37 void R_Shadow_RenderLighting(int numverts, int numtriangles, const int *elements, const float *vertex3f, const float *svector3f, const float *tvector3f, const float *normal3f, const float *texcoord2f, const float *relativelightorigin, const float *relativeeyeorigin, const float *lightcolor, const matrix4x4_t *matrix_modeltolight, const matrix4x4_t *matrix_modeltoattenuationxyz, const matrix4x4_t *matrix_modeltoattenuationz, rtexture_t *basetexture, rtexture_t *bumptexture, rtexture_t *glosstexture, rtexture_t *lightcubemap, vec_t ambientscale, vec_t diffusescale, vec_t specularscale);
38 void R_Shadow_ClearStencil(void);
40 void R_Shadow_RenderVolume(int numvertices, int numtriangles, const float *vertex3f, const int *element3i);
41 int R_Shadow_ScissorForBBox(const float *mins, const float *maxs);
43 // these never change, they are used to create attenuation matrices
44 extern matrix4x4_t matrix_attenuationxyz;
45 extern matrix4x4_t matrix_attenuationz;
47 rtexture_t *R_Shadow_Cubemap(const char *basename);
49 extern dlight_t *r_shadow_worldlightchain;
51 void R_Shadow_UpdateWorldLightSelection(void);
53 extern rtlight_t *r_shadow_compilingrtlight;
55 void R_RTLight_UpdateFromDLight(rtlight_t *rtlight, const dlight_t *light, int isstatic);
56 void R_RTLight_Compile(rtlight_t *rtlight);
57 void R_RTLight_Uncompile(rtlight_t *rtlight);
59 void R_ShadowVolumeLighting(int visiblevolumes);
61 int *R_Shadow_ResizeShadowElements(int numtris);
63 extern int maxshadowmark;
64 extern int numshadowmark;
65 extern int *shadowmark;
66 extern int *shadowmarklist;
67 extern int shadowmarkcount;
68 void R_Shadow_PrepareShadowMark(int numtris);