diff --git a/interface/resources/shaders/face.frag b/interface/resources/shaders/face.frag index 847f1162f1..dbabc1250c 100644 --- a/interface/resources/shaders/face.frag +++ b/interface/resources/shaders/face.frag @@ -1,10 +1,10 @@ #version 120 // -// iris.frag +// face.frag // fragment shader // -// Created by Andrzej Kapolka on 6/13/13. +// Created by Andrzej Kapolka on 7/12/13. // Copyright (c) 2013 High Fidelity, Inc. All rights reserved. // @@ -12,6 +12,6 @@ uniform sampler2D colorTexture; void main(void) { - // modulate texture by diffuse color and add specular contribution + // for now, just modulate color gl_FragColor = gl_Color * texture2D(colorTexture, gl_TexCoord[0].st); } diff --git a/interface/resources/shaders/face.vert b/interface/resources/shaders/face.vert index fa848909c2..704bf77961 100644 --- a/interface/resources/shaders/face.vert +++ b/interface/resources/shaders/face.vert @@ -24,6 +24,7 @@ void main(void) { gl_TexCoord[0] = vec4(texCoordCorner + gl_Vertex.x * texCoordRight + gl_Vertex.y * texCoordUp, 0.0, 1.0); float depth = texture2D(depthTexture, gl_TexCoord[0].st).r; + // set alpha to zero for invalid depth values const float MIN_VISIBLE_DEPTH = 1.0 / 255.0; const float MAX_VISIBLE_DEPTH = 254.0 / 255.0; gl_FrontColor = vec4(1.0, 1.0, 1.0, step(MIN_VISIBLE_DEPTH, depth) * (1.0 - step(MAX_VISIBLE_DEPTH, depth))); diff --git a/interface/src/avatar/Face.cpp b/interface/src/avatar/Face.cpp index 64b0ed7bda..2e462d2cea 100644 --- a/interface/src/avatar/Face.cpp +++ b/interface/src/avatar/Face.cpp @@ -84,7 +84,7 @@ int Face::processVideoMessage(unsigned char* packetData, size_t dataBytes) { if ((_frameBytesRemaining -= payloadSize) <= 0) { float aspectRatio = *(const float*)_arrivingFrame.constData(); - int result = vpx_codec_decode(&_codec, (const uint8_t*)_arrivingFrame.constData() + sizeof(float), + vpx_codec_decode(&_codec, (const uint8_t*)_arrivingFrame.constData() + sizeof(float), _arrivingFrame.size() - sizeof(float), 0, 0); vpx_codec_iter_t iterator = 0; vpx_image_t* image;