Add functions to CameraLight
This commit is contained in:
parent
a0a40281b3
commit
892350ac2e
25 changed files with 83 additions and 77 deletions
|
|
@ -99,7 +99,7 @@ void RenderPolyPlane::Render3DFloor(const TriMatrix &worldToClip, const Vec4f &c
|
|||
swrenderer::CameraLight *cameraLight = swrenderer::CameraLight::Instance();
|
||||
|
||||
int lightlevel = 255;
|
||||
if (cameraLight->fixedlightlev < 0 && sub->sector->e->XFloor.lightlist.Size())
|
||||
if (cameraLight->FixedLightLevel() < 0 && sub->sector->e->XFloor.lightlist.Size())
|
||||
{
|
||||
lightlist_t *light = P_GetPlaneLight(sub->sector, &sub->sector->ceilingplane, false);
|
||||
//basecolormap = light->extra_colormap;
|
||||
|
|
@ -111,7 +111,7 @@ void RenderPolyPlane::Render3DFloor(const TriMatrix &worldToClip, const Vec4f &c
|
|||
PolyDrawArgs args;
|
||||
args.uniforms.globvis = (float)swrenderer::LightVisibility::Instance()->SlopePlaneGlobVis() * 48.0f;
|
||||
args.uniforms.light = (uint32_t)(lightlevel / 255.0f * 256.0f);
|
||||
if (cameraLight->fixedlightlev >= 0 || cameraLight->fixedcolormap)
|
||||
if (cameraLight->FixedLightLevel() >= 0 || cameraLight->FixedColormap())
|
||||
args.uniforms.light = 256;
|
||||
args.uniforms.flags = 0;
|
||||
args.uniforms.subsectorDepth = subsectorDepth;
|
||||
|
|
@ -307,7 +307,7 @@ void RenderPolyPlane::Render(const TriMatrix &worldToClip, const Vec4f &clipPlan
|
|||
PolyDrawArgs args;
|
||||
args.uniforms.globvis = (float)swrenderer::LightVisibility::Instance()->SlopePlaneGlobVis() * 48.0f;
|
||||
args.uniforms.light = (uint32_t)(frontsector->lightlevel / 255.0f * 256.0f);
|
||||
if (cameraLight->fixedlightlev >= 0 || cameraLight->fixedcolormap)
|
||||
if (cameraLight->FixedLightLevel() >= 0 || cameraLight->FixedColormap())
|
||||
args.uniforms.light = 256;
|
||||
args.uniforms.flags = 0;
|
||||
args.uniforms.subsectorDepth = isSky ? RenderPolyScene::SkySubsectorDepth : subsectorDepth;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue