mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 04:00:53 +00:00
- portal WIP
This commit is contained in:
parent
cecfbb76e8
commit
e884a418f8
9 changed files with 9 additions and 12 deletions
|
@ -274,7 +274,7 @@ public:
|
||||||
mSpecialEffect = EFF_NONE;
|
mSpecialEffect = EFF_NONE;
|
||||||
mLightIndex = -1;
|
mLightIndex = -1;
|
||||||
mStreamData.uInterpolationFactor = 0;
|
mStreamData.uInterpolationFactor = 0;
|
||||||
mRenderStyle = DefaultRenderStyle();
|
mRenderStyle = LegacyRenderStyles[STYLE_Translucent];
|
||||||
mMaterial.Reset();
|
mMaterial.Reset();
|
||||||
mBias.Reset();
|
mBias.Reset();
|
||||||
mPassType = NORMAL_PASS;
|
mPassType = NORMAL_PASS;
|
||||||
|
|
|
@ -436,7 +436,7 @@ void FSkyVertexBuffer::RenderDome(FRenderState& state, FGameTexture* tex, float
|
||||||
//
|
//
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void FSkyVertexBuffer::RenderBox(FRenderState& state, FTextureID texno, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2)
|
void FSkyVertexBuffer::RenderBox(FRenderState& state, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2)
|
||||||
{
|
{
|
||||||
int faces;
|
int faces;
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,6 @@ public:
|
||||||
|
|
||||||
void RenderRow(FRenderState& state, EDrawType prim, int row, bool apply = true);
|
void RenderRow(FRenderState& state, EDrawType prim, int row, bool apply = true);
|
||||||
void RenderDome(FRenderState& state, FGameTexture* tex, float x_offset, float y_offset, bool mirror, int mode, bool tiled);
|
void RenderDome(FRenderState& state, FGameTexture* tex, float x_offset, float y_offset, bool mirror, int mode, bool tiled);
|
||||||
void RenderBox(FRenderState& state, FTextureID texno, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2);
|
void RenderBox(FRenderState& state, FSkyBox* tex, float x_offset, bool sky2, float stretch, const FVector3& skyrotatevector, const FVector3& skyrotatevector2);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -421,7 +421,6 @@ void HWDrawInfo::RenderTranslucent(FRenderState &state)
|
||||||
|
|
||||||
void HWDrawInfo::RenderPortal(HWPortal *p, FRenderState &state, bool usestencil)
|
void HWDrawInfo::RenderPortal(HWPortal *p, FRenderState &state, bool usestencil)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
auto gp = static_cast<HWPortal *>(p);
|
auto gp = static_cast<HWPortal *>(p);
|
||||||
gp->SetupStencil(this, state, usestencil);
|
gp->SetupStencil(this, state, usestencil);
|
||||||
auto new_di = StartDrawInfo(this, Viewpoint, &VPUniforms);
|
auto new_di = StartDrawInfo(this, Viewpoint, &VPUniforms);
|
||||||
|
@ -432,7 +431,6 @@ void HWDrawInfo::RenderPortal(HWPortal *p, FRenderState &state, bool usestencil)
|
||||||
state.SetVertexBuffer(screen->mVertexData);
|
state.SetVertexBuffer(screen->mVertexData);
|
||||||
screen->mViewpoints->Bind(state, vpIndex);
|
screen->mViewpoints->Bind(state, vpIndex);
|
||||||
gp->RemoveStencil(this, state, usestencil);
|
gp->RemoveStencil(this, state, usestencil);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -170,7 +170,7 @@ void HWFlat::DrawFlat(HWDrawInfo *di, FRenderState &state, bool translucent)
|
||||||
state.Draw(DT_Triangles, vertindex, vertcount);
|
state.Draw(DT_Triangles, vertindex, vertcount);
|
||||||
vertexcount += vertcount;
|
vertexcount += vertcount;
|
||||||
|
|
||||||
if (translucent) state.SetRenderStyle(DefaultRenderStyle());
|
if (translucent) state.SetRenderStyle(LegacyRenderStyles[STYLE_Translucent]);
|
||||||
//state.SetObjectColor(0xffffffff);
|
//state.SetObjectColor(0xffffffff);
|
||||||
//state.SetAddColor(0);
|
//state.SetAddColor(0);
|
||||||
//state.ApplyTextureManipulation(nullptr);
|
//state.ApplyTextureManipulation(nullptr);
|
||||||
|
|
|
@ -20,11 +20,10 @@ enum
|
||||||
struct HWSkyInfo
|
struct HWSkyInfo
|
||||||
{
|
{
|
||||||
float x_offset;
|
float x_offset;
|
||||||
float y_offset; // doubleskies don't have a y-offset
|
float y_offset;
|
||||||
float y_scale;
|
float y_scale;
|
||||||
int shade;
|
int shade;
|
||||||
FGameTexture * texture;
|
FGameTexture * texture;
|
||||||
FTextureID skytexno1;
|
|
||||||
PalEntry fadecolor;
|
PalEntry fadecolor;
|
||||||
|
|
||||||
bool operator==(const HWSkyInfo & inf)
|
bool operator==(const HWSkyInfo & inf)
|
||||||
|
|
|
@ -66,7 +66,7 @@ void initSkyInfo(HWDrawInfo *di, HWSkyInfo* sky, sectortype* sector, int plane,
|
||||||
sky->y_offset = FixedToFloat(dapyoffs) + ypanning * (float)ti * (1.f / 256.f);
|
sky->y_offset = FixedToFloat(dapyoffs) + ypanning * (float)ti * (1.f / 256.f);
|
||||||
sky->x_offset = xpanning / (1 << (realskybits - dapskybits));
|
sky->x_offset = xpanning / (1 << (realskybits - dapskybits));
|
||||||
sky->fadecolor = FadeColor;
|
sky->fadecolor = FadeColor;
|
||||||
sky->shade = plane == plane_ceiling ? sector->ceilingshade : sector->floorshade;
|
sky->shade = 0;// clamp(plane == plane_ceiling ? sector->ceilingshade : sector->floorshade, 0, numshades - 1);
|
||||||
sky->texture = skytex;
|
sky->texture = skytex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ void HWSkyPortal::DrawContents(HWDrawInfo *di, FRenderState &state)
|
||||||
auto skybox = origin->texture ? dynamic_cast<FSkyBox*>(origin->texture->GetTexture()) : nullptr;
|
auto skybox = origin->texture ? dynamic_cast<FSkyBox*>(origin->texture->GetTexture()) : nullptr;
|
||||||
if (skybox)
|
if (skybox)
|
||||||
{
|
{
|
||||||
vertexBuffer->RenderBox(state, origin->skytexno1, skybox, origin->x_offset, false, /*di->Level->info->pixelstretch*/1, { 0, 0, 1 }, { 0, 0, 1 });
|
vertexBuffer->RenderBox(state, skybox, origin->x_offset, false, /*di->Level->info->pixelstretch*/1, { 0, 0, 1 }, { 0, 0, 1 });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -870,7 +870,7 @@ void HWWall::DoMidTexture(HWDrawInfo* di, walltype* wal,
|
||||||
// todo: transparency.
|
// todo: transparency.
|
||||||
|
|
||||||
DoTexture(di, wal, wal, refheight, topleft, topright, bottomleft, bottomright);
|
DoTexture(di, wal, wal, refheight, topleft, topright, bottomleft, bottomright);
|
||||||
RenderStyle = STYLE_Normal;
|
RenderStyle = STYLE_Translucent;
|
||||||
alpha = 1.f;
|
alpha = 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -928,7 +928,7 @@ void HWWall::Process(HWDrawInfo *di, walltype *wal, sectortype* frontsector, sec
|
||||||
visibility = sectorVisibility(frontsector);
|
visibility = sectorVisibility(frontsector);
|
||||||
|
|
||||||
alpha = 1.0f;
|
alpha = 1.0f;
|
||||||
RenderStyle = STYLE_Normal;
|
RenderStyle = STYLE_Translucent;
|
||||||
texture = NULL;
|
texture = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue