Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/client/renderer/r_material.c b/src/client/renderer/r_material.c
- index a1af9d0..9a19b7d 100644
- --- a/src/client/renderer/r_material.c
- +++ b/src/client/renderer/r_material.c
- @@ -128,6 +128,7 @@ static void R_StageLighting (const mBspSurface_t *surf, const materialStage_t *s
- (stage->flags & (STAGE_LIGHTMAP | STAGE_LIGHTING))) {
- R_EnableTexture(&texunit_lightmap, qtrue);
- R_BindLightmapTexture(surf->lightmap_texnum);
- + R_BindDeluxemapTexture(surf->deluxemap_texnum);
- /* hardware lighting */
- if ((stage->flags & STAGE_LIGHTING)) {
- diff --git a/src/client/renderer/r_surface.c b/src/client/renderer/r_surface.c
- index c0a0680..49369b2 100644
- --- a/src/client/renderer/r_surface.c
- +++ b/src/client/renderer/r_surface.c
- @@ -39,15 +39,12 @@ void R_SetSurfaceBumpMappingParameters (const mBspSurface_t *surf, const image_t
- assert(surf);
- - if (normalMap && (surf->flags & MSURF_LIGHTMAP)) {
- - const image_t *image = surf->texinfo->image;
- - R_BindDeluxemapTexture(surf->deluxemap_texnum);
- + if (normalMap)
- R_EnableBumpmap(normalMap, qtrue);
- - R_UseMaterial(&image->material);
- - } else {
- + else
- R_EnableBumpmap(NULL, qfalse);
- - R_UseMaterial(NULL);
- - }
- +
- + R_UseMaterial(&image->material);
- }
- /**
- @@ -79,8 +76,10 @@ static void R_SetSurfaceState (const mBspSurface_t *surf)
- R_BindTexture(image->texnum); /* texture */
- if (texunit_lightmap.enabled) { /* lightmap */
- - if (surf->flags & MSURF_LIGHTMAP)
- + if (surf->flags & MSURF_LIGHTMAP) {
- R_BindLightmapTexture(surf->lightmap_texnum);
- + R_BindDeluxemapTexture(surf->deluxemap_texnum);
- + }
- }
- R_SetSurfaceBumpMappingParameters(surf, image->normalmap);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement