summaryrefslogtreecommitdiff
path: root/libs/hwui/ProgramCache.cpp
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-09-17 17:43:45 -0700
committerChet Haase <chet@google.com>2012-09-18 14:10:10 -0700
commit0990ffbc4d407e174423a4a04b5902ed83f71db5 (patch)
tree1296fbc452975cfb910733c9fe7f865fd474dd7b /libs/hwui/ProgramCache.cpp
parent218e2f199b9ba568a815d64269ea0784e2d32935 (diff)
Fix GL shader bugs
Fixing errors in emitted shader code that caused GL errors at runtime Change-Id: I267a84398a81329a6688b292505f8779bd750ad1
Diffstat (limited to 'libs/hwui/ProgramCache.cpp')
-rw-r--r--libs/hwui/ProgramCache.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index 2d13f6069fd5..6baf44847d4b 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -294,8 +294,8 @@ const char* gFS_Main_BlendShaders_Modulate[6] = {
";\n",
";\n",
// Modulate
- " * fragColor.a;\n",
- " * fragColor.a;\n",
+ " * color.a;\n",
+ " * color.a;\n",
// Modulate with alpha 8 texture
" * texture2D(baseSampler, outTexCoords).a;\n",
" * pow(texture2D(baseSampler, outTexCoords).a, gamma);\n"
@@ -305,8 +305,8 @@ const char* gFS_Main_GradientShader_Modulate[6] = {
" fragColor = gradientColor;\n",
" fragColor = gradientColor;\n",
// Modulate
- " fragColor = gradientColor * fragColor.a;\n",
- " fragColor = gradientColor * fragColor.a;\n",
+ " fragColor = gradientColor * color.a;\n",
+ " fragColor = gradientColor * color.a;\n",
// Modulate with alpha 8 texture
" fragColor = gradientColor * texture2D(baseSampler, outTexCoords).a;\n",
" fragColor = gradientColor * pow(texture2D(baseSampler, outTexCoords).a, gamma);\n"
@@ -316,8 +316,8 @@ const char* gFS_Main_BitmapShader_Modulate[6] = {
" fragColor = bitmapColor;\n",
" fragColor = bitmapColor;\n",
// Modulate
- " fragColor = bitmapColor * fragColor.a;\n",
- " fragColor = bitmapColor * fragColor.a;\n",
+ " fragColor = bitmapColor * color.a;\n",
+ " fragColor = bitmapColor * color.a;\n",
// Modulate with alpha 8 texture
" fragColor = bitmapColor * texture2D(baseSampler, outTexCoords).a;\n",
" fragColor = bitmapColor * pow(texture2D(baseSampler, outTexCoords).a, gamma);\n"