diff options
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadersource_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadersource_p.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index 70cc67e..61cc63e 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -130,7 +130,7 @@ static const char* const qglslPatternBrushSrcFragmentShader = "\ uniform lowp vec4 patternColor; \ varying mediump vec2 patternTexCoords;\ lowp vec4 srcPixel() { \ - return patternColor * texture2D(brushTexture, patternTexCoords).r; \ + return patternColor * (1.0 - texture2D(brushTexture, patternTexCoords).r); \ }\n"; @@ -278,6 +278,13 @@ static const char* const qglslTextureBrushSrcFragmentShader = "\ return texture2D(brushTexture, brushTextureCoords); \ }"; +static const char* const qglslTextureBrushSrcWithPatternFragmentShader = "\ + varying mediump vec2 brushTextureCoords; \ + uniform lowp vec4 patternColor; \ + uniform sampler2D brushTexture; \ + lowp vec4 srcPixel() { \ + return patternColor * (1.0 - texture2D(brushTexture, brushTextureCoords).r); \ + }"; // Solid Fill Brush static const char* const qglslSolidBrushSrcFragmentShader = "\ @@ -293,6 +300,14 @@ static const char* const qglslImageSrcFragmentShader = "\ return texture2D(imageTexture, textureCoords); \ }"; +static const char* const qglslImageSrcWithPatternFragmentShader = "\ + varying highp vec2 textureCoords; \ + uniform lowp vec4 patternColor; \ + uniform sampler2D imageTexture; \ + lowp vec4 srcPixel() { \ + return patternColor * (1.0 - texture2D(imageTexture, textureCoords).r); \ + }\n"; + static const char* const qglslNonPremultipliedImageSrcFragmentShader = "\ varying highp vec2 textureCoords; \ uniform sampler2D imageTexture; \ |