1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 04:45:33 +00:00

Fix combinedAlpha

This commit is contained in:
scrawl 2013-04-10 20:25:03 +02:00
parent 9c7ad75816
commit 2c70074dd7

View file

@ -227,7 +227,8 @@
#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
// Layer calculations
@ -252,7 +253,7 @@ float combinedAlpha = 0.f;
#else
albedo = shLerp(albedo, shSample(diffuseMap@shIterator, UV * 10).rgb, blendValues@shPropertyString(blendmap_component_@shIterator));
#endif
combinedAlpha += blendValues@shPropertyString(blendmap_component_@shIterator);
previousAlpha *= 1.f-blendValues@shPropertyString(blendmap_component_@shIterator);
#endif
@shEndForeach
@ -344,7 +345,7 @@ float combinedAlpha = 0.f;
#if IS_FIRST_PASS
shOutputColour(0).a = 1;
#else
shOutputColour(0).a = min(combinedAlpha, 1.f);
shOutputColour(0).a = 1.f-previousAlpha;
#endif
}