mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-24 00:39:49 +00:00
Fix combinedAlpha
This commit is contained in:
parent
9c7ad75816
commit
2c70074dd7
@ -227,7 +227,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !IS_FIRST_PASS
|
#if !IS_FIRST_PASS
|
||||||
float combinedAlpha = 0.f;
|
// Opacity the previous passes should have, i.e. 1 - (opacity of this pass)
|
||||||
|
float previousAlpha = 1.f;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Layer calculations
|
// Layer calculations
|
||||||
@ -252,7 +253,7 @@ float combinedAlpha = 0.f;
|
|||||||
#else
|
#else
|
||||||
albedo = shLerp(albedo, shSample(diffuseMap@shIterator, UV * 10).rgb, blendValues@shPropertyString(blendmap_component_@shIterator));
|
albedo = shLerp(albedo, shSample(diffuseMap@shIterator, UV * 10).rgb, blendValues@shPropertyString(blendmap_component_@shIterator));
|
||||||
#endif
|
#endif
|
||||||
combinedAlpha += blendValues@shPropertyString(blendmap_component_@shIterator);
|
previousAlpha *= 1.f-blendValues@shPropertyString(blendmap_component_@shIterator);
|
||||||
#endif
|
#endif
|
||||||
@shEndForeach
|
@shEndForeach
|
||||||
|
|
||||||
@ -344,7 +345,7 @@ float combinedAlpha = 0.f;
|
|||||||
#if IS_FIRST_PASS
|
#if IS_FIRST_PASS
|
||||||
shOutputColour(0).a = 1;
|
shOutputColour(0).a = 1;
|
||||||
#else
|
#else
|
||||||
shOutputColour(0).a = min(combinedAlpha, 1.f);
|
shOutputColour(0).a = 1.f-previousAlpha;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user