- extended FTexture::GetPixels and FTexture::GetColumn by a RenderStyle parameter.
Now it is no longer necessary to provide specially set up textures for rendering shaded decals, they can use any PNG texture now that contains a proper red channel. Handling of the alPh chunk has been removed as a result as it in no longer needed.
This commit is contained in:
parent
a399d79f8a
commit
f4d9ad1123
41 changed files with 217 additions and 249 deletions
|
|
@ -195,11 +195,17 @@ protected:
|
|||
int NumParts;
|
||||
TexPart *Parts;
|
||||
TexInit *Inits;
|
||||
bool bRedirect:1;
|
||||
bool bTranslucentPatches:1;
|
||||
bool bRedirect;
|
||||
bool bTranslucentPatches;
|
||||
|
||||
uint8_t *MakeTexture (FRenderStyle style);
|
||||
|
||||
// The getters must optionally redirect if it's a simple one-patch texture.
|
||||
const uint8_t *GetPixels(FRenderStyle style) override { return bRedirect ? Parts->Texture->GetPixels(style) : FWorldTexture::GetPixels(style); }
|
||||
const uint8_t *GetColumn(FRenderStyle style, unsigned int col, const Span **out) override
|
||||
{ return bRedirect ? Parts->Texture->GetColumn(style, col, out) : FWorldTexture::GetColumn(style, col, out); }
|
||||
|
||||
|
||||
private:
|
||||
void CheckForHacks ();
|
||||
void ParsePatch(FScanner &sc, TexPart & part, TexInit &init);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue