From 0990ffbc4d407e174423a4a04b5902ed83f71db5 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Mon, 17 Sep 2012 17:43:45 -0700 Subject: Fix GL shader bugs Fixing errors in emitted shader code that caused GL errors at runtime Change-Id: I267a84398a81329a6688b292505f8779bd750ad1 --- libs/hwui/ProgramCache.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libs/hwui/ProgramCache.cpp') 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" -- cgit v1.2.3-59-g8ed1b