fixed ravestick, merged

This commit is contained in:
ericrius1 2015-12-22 12:03:03 -08:00
parent bb28369dee
commit 6fc98bd577
2 changed files with 6 additions and 0 deletions

View file

@ -21,6 +21,7 @@ uniform sampler2D originalTexture;
// the interpolated normal // the interpolated normal
in vec3 interpolatedNormal; in vec3 interpolatedNormal;
in vec2 varTexcoord; in vec2 varTexcoord;
in vec4 varColor;
struct PolyLineUniforms { struct PolyLineUniforms {
vec3 color; vec3 color;
@ -35,6 +36,7 @@ void main(void) {
vec4 texel = texture(originalTexture, varTexcoord); vec4 texel = texture(originalTexture, varTexcoord);
int frontCondition = 1 -int(gl_FrontFacing) * 2; int frontCondition = 1 -int(gl_FrontFacing) * 2;
vec3 color = varColor.rgb;
packDeferredFragmentTranslucent( packDeferredFragmentTranslucent(
interpolatedNormal * frontCondition, interpolatedNormal * frontCondition,
texel.a, texel.a,

View file

@ -23,9 +23,13 @@ out vec3 interpolatedNormal;
//the diffuse texture //the diffuse texture
out vec2 varTexcoord; out vec2 varTexcoord;
out vec4 varColor;
void main(void) { void main(void) {
varTexcoord = inTexCoord0.st; varTexcoord = inTexCoord0.st;
// pass along the diffuse color
varColor = colorToLinearRGBA(inColor); varColor = colorToLinearRGBA(inColor);