mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-15 15:51:07 +02:00
Fixed a bug with spec maps.
This commit is contained in:
@@ -442,10 +442,10 @@ void RB_T_FillDepthBuffer( const drawSurf_t *surf ) {
|
||||
|
||||
bool drawSolid = false;
|
||||
|
||||
if ( shader->Coverage() == MC_OPAQUE ) {
|
||||
//if ( shader->Coverage() == MC_OPAQUE ) {
|
||||
drawSolid = true;
|
||||
}
|
||||
|
||||
//}
|
||||
#if 0
|
||||
// we may have multiple alpha tested stages
|
||||
if ( shader->Coverage() == MC_PERFORATED ) {
|
||||
// if the only alpha tested stages are condition register omitted,
|
||||
@@ -497,7 +497,7 @@ void RB_T_FillDepthBuffer( const drawSurf_t *surf ) {
|
||||
drawSolid = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
// draw the entire surface solid
|
||||
// draw the entire surface solid
|
||||
if (drawSolid && !shader->IsSky()) {
|
||||
@@ -512,10 +512,15 @@ void RB_T_FillDepthBuffer( const drawSurf_t *surf ) {
|
||||
shader->GetBumpImage()->Bind();
|
||||
glBindNormalMapTexture(shader->GetBumpImage()->texnum);
|
||||
|
||||
GL_SelectTexture(2);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
shader->GetSpecImage()->Bind();
|
||||
glBindSpecularMapTexture(shader->GetSpecImage()->texnum);
|
||||
|
||||
idImage* glowMapImage = shader->GetGlowImage();
|
||||
if (glowMapImage)
|
||||
{
|
||||
GL_SelectTexture(2);
|
||||
GL_SelectTexture(3);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glowMapImage->Bind();
|
||||
glBindGlowMapTexture(glowMapImage->texnum);
|
||||
@@ -539,11 +544,15 @@ void RB_T_FillDepthBuffer( const drawSurf_t *surf ) {
|
||||
|
||||
if (glowMapImage)
|
||||
{
|
||||
GL_SelectTexture(2);
|
||||
GL_SelectTexture(3);
|
||||
glBindGlowMapTexture(0);
|
||||
globalImages->BindNull();
|
||||
}
|
||||
|
||||
GL_SelectTexture(2);
|
||||
glBindSpecularMapTexture(0);
|
||||
globalImages->BindNull();
|
||||
|
||||
GL_SelectTexture(1);
|
||||
glBindNormalMapTexture(0);
|
||||
globalImages->BindNull();
|
||||
@@ -940,6 +949,11 @@ void RB_STD_T_RenderShaderPasses( const drawSurf_t *surf ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// check the stage enable condition
|
||||
if (regs[pStage->conditionRegister] == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// select the vertex color source
|
||||
if ( pStage->vertexColor == SVC_IGNORE ) {
|
||||
glColor4fv( color );
|
||||
|
||||
Reference in New Issue
Block a user