mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- Floatify smoothratio
for render_drawrooms()
and `render_camtex().
This commit is contained in:
parent
01d185dc6b
commit
8f2d6f0779
3 changed files with 9 additions and 10 deletions
|
@ -305,7 +305,7 @@ static void CheckTimer(FRenderState &state, uint64_t ShaderStartTime)
|
|||
void animatecamsprite(double s);
|
||||
|
||||
|
||||
void render_drawrooms(DCoreActor* playersprite, const DVector3& position, int sectnum, DAngle angle, fixedhoriz horizon, DAngle rollang, double smoothratio, float fov)
|
||||
void render_drawrooms(DCoreActor* playersprite, const DVector3& position, int sectnum, DAngle angle, fixedhoriz horizon, DAngle rollang, double interpfrac, float fov)
|
||||
{
|
||||
checkRotatedWalls();
|
||||
|
||||
|
@ -320,8 +320,7 @@ void render_drawrooms(DCoreActor* playersprite, const DVector3& position, int se
|
|||
|
||||
// Get this before everything else
|
||||
FRenderViewpoint r_viewpoint = SetupViewpoint(playersprite, position, sectnum, angle, horizon, rollang, fov);
|
||||
if (cl_capfps) r_viewpoint.TicFrac = 1.;
|
||||
else r_viewpoint.TicFrac = smoothratio * (1./MaxSmoothRatio);
|
||||
r_viewpoint.TicFrac = !cl_capfps ? interpfrac : 1.;
|
||||
|
||||
screen->mLights->Clear();
|
||||
screen->mViewpoints->Clear();
|
||||
|
@ -360,7 +359,7 @@ void render_drawrooms(DCoreActor* playersprite, const DVector3& position, int se
|
|||
All.Unclock();
|
||||
}
|
||||
|
||||
void render_camtex(DCoreActor* playersprite, const DVector3& position, sectortype* sect, DAngle angle, fixedhoriz horizon, DAngle rollang, FGameTexture* camtex, IntRect& rect, double smoothratio)
|
||||
void render_camtex(DCoreActor* playersprite, const DVector3& position, sectortype* sect, DAngle angle, fixedhoriz horizon, DAngle rollang, FGameTexture* camtex, IntRect& rect, double interpfrac)
|
||||
{
|
||||
updatesector(position, §);
|
||||
if (!sect) return;
|
||||
|
@ -371,7 +370,7 @@ void render_camtex(DCoreActor* playersprite, const DVector3& position, sectortyp
|
|||
float ratio = camtex->GetDisplayWidth() / camtex->GetDisplayHeight();
|
||||
|
||||
FRenderViewpoint r_viewpoint = SetupViewpoint(playersprite, position, sectnum(sect), angle, horizon, rollang);
|
||||
if (cl_capfps) r_viewpoint.TicFrac = smoothratio;
|
||||
r_viewpoint.TicFrac = !cl_capfps ? interpfrac : 1.;
|
||||
|
||||
RenderViewpoint(r_viewpoint, &rect, r_viewpoint.FieldOfView.Degrees(), ratio, ratio, false, false);
|
||||
All.Unclock();
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
class FSerializer;
|
||||
struct IntRect;
|
||||
|
||||
void render_drawrooms(DCoreActor* playersprite, const DVector3& position, int sectnum, DAngle angle, fixedhoriz horizon, DAngle rollang, double smoothratio, float fov = -1);
|
||||
void render_camtex(DCoreActor* playersprite, const DVector3& position, sectortype* sect, DAngle angle, fixedhoriz horizon, DAngle rollang, FGameTexture* camtex, IntRect& rect, double smoothratio);
|
||||
void render_drawrooms(DCoreActor* playersprite, const DVector3& position, int sectnum, DAngle angle, fixedhoriz horizon, DAngle rollang, double interpfrac, float fov = -1);
|
||||
void render_camtex(DCoreActor* playersprite, const DVector3& position, sectortype* sect, DAngle angle, fixedhoriz horizon, DAngle rollang, FGameTexture* camtex, IntRect& rect, double interpfrac);
|
||||
|
||||
inline void render_drawrooms(DCoreActor* playersprite, const vec3_t& position, int sectnum, DAngle angle, fixedhoriz horizon, DAngle rollang, double smoothratio, float fov = -1)
|
||||
{
|
||||
render_drawrooms(playersprite, DVector3(position.X * inttoworld, position.Y * inttoworld, position.Z * zinttoworld), sectnum, angle, horizon, rollang, smoothratio, fov);
|
||||
render_drawrooms(playersprite, DVector3(position.X * inttoworld, position.Y * inttoworld, position.Z * zinttoworld), sectnum, angle, horizon, rollang, smoothratio * (1. / MaxSmoothRatio), fov);
|
||||
}
|
||||
inline void render_camtex(DCoreActor* playersprite, const vec3_t& position, sectortype* sect, DAngle angle, fixedhoriz horizon, DAngle rollang, FGameTexture* camtex, IntRect& rect, double smoothratio)
|
||||
{
|
||||
render_camtex(playersprite, DVector3(position.X* inttoworld, position.Y * inttoworld, position.Z* zinttoworld), sect, angle, horizon, rollang, camtex, rect, smoothratio);
|
||||
render_camtex(playersprite, DVector3(position.X* inttoworld, position.Y * inttoworld, position.Z* zinttoworld), sect, angle, horizon, rollang, camtex, rect, smoothratio * (1. / MaxSmoothRatio));
|
||||
}
|
||||
|
||||
struct PortalDesc
|
||||
|
|
|
@ -304,7 +304,7 @@ void DrawView(double interpfrac, bool sceneonly)
|
|||
|
||||
if (!nFreeze && !sceneonly)
|
||||
DrawWeapons(interpfrac);
|
||||
render_drawrooms(nullptr, nCamerapos, sectnum(pSector), nCameraang, nCamerapan, rotscrnang, interpfrac * MaxSmoothRatio);
|
||||
render_drawrooms(nullptr, nCamerapos, sectnum(pSector), nCameraang, nCamerapan, rotscrnang, interpfrac);
|
||||
|
||||
if (HavePLURemap())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue