diff --git a/doomsday/client/include/render/rend_halo.h b/doomsday/client/include/render/rend_halo.h index c54a7498e3..e3fd065161 100644 --- a/doomsday/client/include/render/rend_halo.h +++ b/doomsday/client/include/render/rend_halo.h @@ -20,19 +20,6 @@ #ifndef DENG_CLIENT_RENDER_HALO_H #define DENG_CLIENT_RENDER_HALO_H -#include - -DENG_EXTERN_C int haloOccludeSpeed; - -void H_Register(); - -#endif - -#if 0 - -#ifndef DENG_CLIENT_RENDER_HALO_H -#define DENG_CLIENT_RENDER_HALO_H - #include #include "TextureVariantSpec" @@ -82,5 +69,3 @@ bool H_RenderHalo(de::Vector3d const &origin, float size, D_CMD(FlareConfig); #endif // DENG_CLIENT_RENDER_HALO_H - -#endif // 0 diff --git a/doomsday/client/src/gl/gl_texmanager.cpp b/doomsday/client/src/gl/gl_texmanager.cpp index 710b7e46ac..1d9dde270c 100644 --- a/doomsday/client/src/gl/gl_texmanager.cpp +++ b/doomsday/client/src/gl/gl_texmanager.cpp @@ -1104,13 +1104,11 @@ void GL_LoadSystemTextures() GL_PrepareSysFlaremap(FXT_ROUND); GL_PrepareSysFlaremap(FXT_FLARE); - - /* if(!haloRealistic) { GL_PrepareSysFlaremap(FXT_BRFLARE); GL_PrepareSysFlaremap(FXT_BIGFLARE); - }*/ + } Rend_ParticleLoadSystemTextures(); } @@ -1838,8 +1836,6 @@ DGLuint GL_PrepareLSTexture(lightingtexid_t which) DGLuint GL_PrepareSysFlaremap(flaretexid_t which) { - DENG_UNUSED(which); -#if 0 if(novideo) return 0; if(which < 0 || which >= NUM_SYSFLARE_TEXTURES) return 0; @@ -1877,15 +1873,10 @@ DGLuint GL_PrepareSysFlaremap(flaretexid_t which) DENG_ASSERT(sysFlareTextures[which] != 0); return sysFlareTextures[which]; -#endif - return 0; } DGLuint GL_PrepareFlaremap(de::Uri const &resourceUri) { - DENG_UNUSED(resourceUri); -#if 0 - return 0; if(resourceUri.path().length() == 1) { // Select a system flare by numeric identifier? @@ -1904,7 +1895,6 @@ DGLuint GL_PrepareFlaremap(de::Uri const &resourceUri) } // Dang... } -#endif return 0; } diff --git a/doomsday/client/src/render/lumobj.cpp b/doomsday/client/src/render/lumobj.cpp index 488b897843..f98bbb19ae 100644 --- a/doomsday/client/src/render/lumobj.cpp +++ b/doomsday/client/src/render/lumobj.cpp @@ -230,8 +230,7 @@ void Lumobj::generateFlare(Vector3d const &eye, double distFromEye) vis->distance = distFromEye; V3f_Set(vis->data.flare.color, d->color.x, d->color.y, d->color.z); vis->data.flare.mul = d->source->occlusion(eye) * attenuation(distFromEye); - //vis->data.flare.size = d->flareSize > 0? de::max(1.f, d->flareSize * 60 * (50 + haloSize) / 100.0f) : 0; - vis->data.flare.size = 1; + vis->data.flare.size = d->flareSize > 0? de::max(1.f, d->flareSize * 60 * (50 + haloSize) / 100.0f) : 0; vis->data.flare.tex = d->flareTex; vis->data.flare.lumIdx = indexInMap(); vis->data.flare.isDecoration = true; diff --git a/doomsday/client/src/render/r_things.cpp b/doomsday/client/src/render/r_things.cpp index 06fc9d6116..1d44d84579 100644 --- a/doomsday/client/src/render/r_things.cpp +++ b/doomsday/client/src/render/r_things.cpp @@ -478,9 +478,9 @@ void R_ProjectSprite(mobj_t *mo) vis->data.flare.flags = def->flags; } - vis->data.flare.size = 1; //flareSize * 60 * (50 + haloSize) / 100.0f; - /*if(vis->data.flare.size < 8) - vis->data.flare.size = 8;*/ + vis->data.flare.size = flareSize * 60 * (50 + haloSize) / 100.0f; + if(vis->data.flare.size < 8) + vis->data.flare.size = 8; // Color is taken from the associated lumobj. V3f_Set(vis->data.flare.color, lum->color().x, lum->color().y, lum->color().z); diff --git a/doomsday/client/src/render/rend_halo.cpp b/doomsday/client/src/render/rend_halo.cpp index 68a933a385..609cb9f2b9 100644 --- a/doomsday/client/src/render/rend_halo.cpp +++ b/doomsday/client/src/render/rend_halo.cpp @@ -17,23 +17,6 @@ * http://www.gnu.org/licenses */ -#include "de_base.h" -#include "de_console.h" -#include "render/rend_halo.h" - -int haloOccludeSpeed = 48; - -void H_Register(void) -{ - cvartemplate_t cvars[] = { - {"rend-halo-occlusion", CVF_NO_MAX, CVT_INT, &haloOccludeSpeed, 0, 0}, - {NULL} - }; - Con_AddVariableList(cvars); -} - -#if 0 // old GL1 implementation - #include #include "de_base.h" @@ -62,6 +45,7 @@ D_CMD(FlareConfig); int haloMode = 5, haloBright = 45, haloSize = 80; int haloRealistic = true; +int haloOccludeSpeed = 48; float haloZMagDiv = 62, haloMinRadius = 20; float haloDimStart = 10, haloDimEnd = 100; @@ -413,4 +397,3 @@ D_CMD(FlareConfig) return true; } -#endif diff --git a/doomsday/client/src/render/sprite.cpp b/doomsday/client/src/render/sprite.cpp index 2c94bfb2e3..d18e9634bc 100644 --- a/doomsday/client/src/render/sprite.cpp +++ b/doomsday/client/src/render/sprite.cpp @@ -674,12 +674,6 @@ static void setupModelParamsForVisPSprite(rendmodelparams_t *params, vispsprite_ static bool generateHaloForVisSprite(vissprite_t const *spr, bool primary = false) { - /// @todo Rethink how to draw the 3D halo around the object. Needs to be done - /// in the vissprite order. - DENG_UNUSED(spr); - DENG_UNUSED(primary); - return false; -#if 0 float occlusionFactor; if(primary && (spr->data.flare.flags & RFF_NO_PRIMARY)) @@ -707,7 +701,6 @@ static bool generateHaloForVisSprite(vissprite_t const *spr, bool primary = fals occlusionFactor, spr->data.flare.mul, spr->data.flare.xOff, primary, (spr->data.flare.flags & RFF_NO_TURN) == 0); -#endif } void Rend_DrawMasked() @@ -751,7 +744,6 @@ void Rend_DrawMasked() } } -#if 0 // Draw secondary halos? if(primaryHaloDrawn && haloMode > 1) { @@ -769,7 +761,6 @@ void Rend_DrawMasked() // And we're done... H_SetupState(false); } -#endif } } diff --git a/doomsday/client/src/resource/materialsnapshot.cpp b/doomsday/client/src/resource/materialsnapshot.cpp index 198eb9e5b9..216da3b4d1 100644 --- a/doomsday/client/src/resource/materialsnapshot.cpp +++ b/doomsday/client/src/resource/materialsnapshot.cpp @@ -150,9 +150,6 @@ MaterialSnapshot::Decoration &MaterialSnapshot::decoration(int index) const */ static DGLuint prepareFlaremap(Texture *texture, int oldIdx) { - DENG_UNUSED(texture); - DENG_UNUSED(oldIdx); -#if 0 if(texture) { if(TextureVariant const *variant = texture->prepareVariant(Rend_HaloTextureSpec())) @@ -165,7 +162,6 @@ static DGLuint prepareFlaremap(Texture *texture, int oldIdx) { return GL_PrepareSysFlaremap(flaretexid_t(oldIdx - 1)); } -#endif return 0; // Use the automatic selection logic. } diff --git a/doomsday/client/src/ui/editors/rendererappearanceeditor.cpp b/doomsday/client/src/ui/editors/rendererappearanceeditor.cpp index cfc1cf1a84..7145e553c5 100644 --- a/doomsday/client/src/ui/editors/rendererappearanceeditor.cpp +++ b/doomsday/client/src/ui/editors/rendererappearanceeditor.cpp @@ -402,7 +402,6 @@ DENG2_OBSERVES(App, GameChange) haloGroup->addLabel(tr("Vignette Width:")); haloGroup->addSlider("rend-vignette-width"); -#if 0 haloGroup->addSpace(); haloGroup->addToggle("rend-halo-realistic", tr("Realistic Halos")); @@ -414,10 +413,10 @@ DENG2_OBSERVES(App, GameChange) haloGroup->addLabel(tr("Halo Size Factor:")); haloGroup->addSlider("rend-halo-size"); -#endif + haloGroup->addLabel(tr("Occlusion Fading:")); haloGroup->addSlider("rend-halo-occlusion", Ranged(1, 256), 1, 0); -#if 0 + haloGroup->addLabel(tr("Min Halo Radius:")); haloGroup->addSlider("rend-halo-radius-min", Ranged(1, 80), .1, 1); @@ -432,7 +431,7 @@ DENG2_OBSERVES(App, GameChange) haloGroup->addLabel(tr("Z-Mag Divisor:")); haloGroup->addSlider("rend-halo-zmag-div", Ranged(1, 100), .1, 1); -#endif + haloGroup->commit(); // Material settings.