This commit is contained in:
commit
e1b4bb11ba
19 changed files with 114 additions and 71 deletions
|
|
@ -378,14 +378,3 @@ void FSoftwareRenderer::PreprocessLevel()
|
|||
void FSoftwareRenderer::CleanLevelData()
|
||||
{
|
||||
}
|
||||
|
||||
double FSoftwareRenderer::GetVisibility()
|
||||
{
|
||||
return mScene.MainThread()->Light->GetVisibility();
|
||||
}
|
||||
|
||||
void FSoftwareRenderer::SetVisibility(double vis)
|
||||
{
|
||||
mScene.MainThread()->Light->SetVisibility(mScene.MainThread()->Viewport.get(), vis);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@ struct FSoftwareRenderer : public FRenderer
|
|||
void PreprocessLevel() override;
|
||||
void CleanLevelData() override;
|
||||
|
||||
double GetVisibility() override;
|
||||
void SetVisibility(double vis) override;
|
||||
|
||||
private:
|
||||
void PrecacheTexture(FTexture *tex, int cache);
|
||||
|
||||
|
|
|
|||
|
|
@ -104,8 +104,7 @@ namespace swrenderer
|
|||
// Changes how rapidly things get dark with distance
|
||||
void LightVisibility::SetVisibility(RenderViewport *viewport, double vis)
|
||||
{
|
||||
// Allow negative visibilities, just for novelty's sake
|
||||
vis = clamp(vis, -204.7, 204.7); // (205 and larger do not work in 5:4 aspect ratio)
|
||||
vis = R_ClampVisibility(vis);
|
||||
|
||||
CurrentVisibility = vis;
|
||||
|
||||
|
|
@ -167,25 +166,6 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
// Controls how quickly light ramps across a 1/z range. Set this, and it
|
||||
// sets all the r_*Visibility variables (except r_SkyVisibilily, which is
|
||||
// currently unused).
|
||||
CCMD(r_visibility)
|
||||
{
|
||||
if (argv.argc() < 2)
|
||||
{
|
||||
Printf("Visibility is %g\n", Renderer->GetVisibility());
|
||||
}
|
||||
else if (!netgame)
|
||||
{
|
||||
Renderer->SetVisibility(atof(argv[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("Visibility cannot be changed in net games.\n");
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void ColormapLight::SetColormap(double visibility, int shade, FDynamicColormap *basecolormap, bool fullbright, bool invertColormap, bool fadeToBlack)
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@
|
|||
|
||||
CVAR(String, r_viewsize, "", CVAR_NOSET)
|
||||
|
||||
EXTERN_CVAR(Float, r_visibility);
|
||||
|
||||
namespace swrenderer
|
||||
{
|
||||
RenderViewport::RenderViewport()
|
||||
|
|
@ -109,7 +111,7 @@ namespace swrenderer
|
|||
InitTextureMapping();
|
||||
|
||||
// Reset r_*Visibility vars
|
||||
thread->Light->SetVisibility(this, thread->Light->GetVisibility());
|
||||
thread->Light->SetVisibility(this, r_visibility);
|
||||
|
||||
SetupBuffer();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue