mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
Preventing render bug with mis-scaled mouth (part of screen all black)
This commit is contained in:
parent
124f04820e
commit
72d657b51d
1 changed files with 4 additions and 3 deletions
|
@ -297,9 +297,10 @@ void Head::render(bool lookingInMirror, float bodyYaw) {
|
|||
glColor3f(0,0,0);
|
||||
glRotatef(mouthPitch, 1, 0, 0);
|
||||
glRotatef(mouthYaw, 0, 0, 1);
|
||||
if (averageLoudness > 1.f) {
|
||||
glScalef(mouthWidth * (.7f + sqrt(averageLoudness) /60.f),
|
||||
mouthHeight * (1.f + sqrt(averageLoudness) /30.f), 1);
|
||||
|
||||
if ((averageLoudness > 1.f) && (averageLoudness < 10000.f)) {
|
||||
glScalef(mouthWidth * (.7f + sqrt(averageLoudness) / 60.f),
|
||||
mouthHeight * (1.f + sqrt(averageLoudness) / 30.f), 1);
|
||||
} else {
|
||||
glScalef(mouthWidth, mouthHeight, 1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue