Skip to content

Commit

Permalink
Fixed foam of waterfalls (#110)
Browse files Browse the repository at this point in the history
Water fall foam looks more realistic.
  • Loading branch information
ThielHater authored Oct 1, 2022
1 parent ad1ac1b commit a64abdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions D3D11Engine/WorldConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@ HRESULT WorldConverter::ConvertWorldMesh( zCPolygon** polys, unsigned int numPol
&& !mat->HasAlphaTest() ) // Fix foam on waterfalls
{
#ifdef BUILD_GOTHIC_1_08k
if ( key.Texture && key.Texture->HasAlphaChannel() && AdditionalCheckWaterFall( key.Texture ) ) { // Fix foam on waterfalls
// Give it alpha test since it contains alpha channel and most like is the foam
if ( key.Texture && AdditionalCheckWaterFall( key.Texture ) ) { // Fix foam on waterfalls
// Give it alpha blend since it contains alpha channel and most like is the foam
// Normal water surfaces shouldn't have alpha channel
mat->SetAlphaFunc( zMAT_ALPHA_FUNC_TEST );
mat->SetAlphaFunc( zMAT_ALPHA_FUNC_BLEND );
} else {
// Give water surfaces a water-shader
MaterialInfo* info = Engine::GAPI->GetMaterialInfoFrom( key.Texture );
Expand Down

0 comments on commit a64abdd

Please sign in to comment.