Fixed bug with invalid initialization of tr.shadowShader (it was broken in the first commit on april 10).
Disable stencil test after we done with shadow volumes rendering.
This commit is contained in:
parent
1d38f1774f
commit
b6fb89caaa
|
|
@ -2892,6 +2892,12 @@ static void CreateInternalShaders( void ) {
|
|||
|
||||
tr.defaultShader = FinishShader();
|
||||
|
||||
// shadow shader is just a marker
|
||||
Q_strncpyz( shader.name, "<stencil shadow>", sizeof( shader.name ) );
|
||||
shader.sort = SS_STENCIL_SHADOW;
|
||||
|
||||
tr.shadowShader = FinishShader();
|
||||
|
||||
// cinematic shader
|
||||
Com_Memset( &shader, 0, sizeof( shader ) );
|
||||
Com_Memset( &stages, 0, sizeof( stages ) );
|
||||
|
|
@ -2905,15 +2911,6 @@ static void CreateInternalShaders( void ) {
|
|||
stages[0].stateBits = GLS_DEPTHTEST_DISABLE;
|
||||
|
||||
tr.cinematicShader = FinishShader();
|
||||
|
||||
// shadow shader is just a marker
|
||||
Com_Memset( &shader, 0, sizeof( shader ) );
|
||||
Com_Memset( &stages, 0, sizeof( stages ) );
|
||||
|
||||
Q_strncpyz( shader.name, "<stencil shadow>", sizeof( shader.name ) );
|
||||
shader.sort = SS_STENCIL_SHADOW;
|
||||
|
||||
tr.shadowShader = FinishShader();
|
||||
}
|
||||
|
||||
static void CreateExternalShaders( void ) {
|
||||
|
|
|
|||
|
|
@ -263,6 +263,7 @@ void RB_ShadowTessEnd( void ) {
|
|||
R_Vk_RenderShadowEdges(vk.shadow_volume_pipelines[1][0]);
|
||||
}
|
||||
|
||||
qglDisable(GL_STENCIL_TEST);
|
||||
|
||||
// reenable writing to the color buffer
|
||||
qglColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user