Skip to content

Commit

Permalink
Fix a bug with shields being invisible on land maps (#5162)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackYps committed Jul 13, 2023
1 parent 01cd129 commit a44562d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions effects/mesh.fx
Original file line number Diff line number Diff line change
Expand Up @@ -3488,8 +3488,10 @@ float4 NormalMappedInsectPS_02( NORMALMAPPED_VERTEX vertex, uniform bool hiDefSh

float shieldWaterAbsorption(float depth) {
float factor = 1.0;
if (depth < 0) factor = 0.6;
factor *= 1 - tex1D(WaterRampSampler, (-depth / (surfaceElevation - abyssElevation))).w;
if (surfaceElevation > 0) {
if (depth < 0) factor = 0.6;
factor *= 1 - tex1D(WaterRampSampler, (-depth / (surfaceElevation - abyssElevation))).w;
}
return factor;
}

Expand Down

0 comments on commit a44562d

Please sign in to comment.