mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-29 16:31:43 +00:00
- use separate textures for the palswap shade tables.
This creates a lot less mess than one big texture and also allows easier use of texelFetch in the server which is preferable for data textures.
This commit is contained in:
parent
06e9a60190
commit
7131fe6c6e
8 changed files with 37 additions and 71 deletions
|
@ -441,10 +441,7 @@ void GLInstance::SetPalette(int index)
|
|||
|
||||
void GLInstance::SetPalswap(int index)
|
||||
{
|
||||
float v1 = index * renderState.PalswapSize[0];
|
||||
float v2 = floorf(v1);
|
||||
renderState.PalswapPos[0] = v1 - v2 + (0.5f / PALSWAP_TEXTURE_SIZE);
|
||||
renderState.PalswapPos[1] = v2 * renderState.PalswapSize[1] + (0.5f / PALSWAP_TEXTURE_SIZE);
|
||||
palmanager.BindPalswap(index);
|
||||
}
|
||||
|
||||
|
||||
|
@ -466,9 +463,6 @@ void PolymostRenderState::Apply(PolymostShader* shader)
|
|||
shader->Brightness.Set(Brightness);
|
||||
shader->Fog.Set(Fog);
|
||||
shader->FogColor.Set(FogColor);
|
||||
shader->PalswapPos.Set(PalswapPos);
|
||||
shader->PalswapSize.Set(PalswapSize);
|
||||
shader->PalswapIndex.Set(PalSwapIndex);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue