File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 78
78
" uniform highp vec4 cc_SinTime;\n "
79
79
" uniform highp vec4 cc_CosTime;\n "
80
80
" uniform highp vec4 cc_Random01;\n\n "
81
- " uniform lowp sampler2D cc_MainTexture;\n\n "
82
- " varying lowp vec4 cc_FragColor;\n "
81
+ " uniform " XSTR(CC_SHADER_COLOR_PRECISION) " sampler2D cc_MainTexture;\n\n "
82
+ " varying " XSTR(CC_SHADER_COLOR_PRECISION) " vec4 cc_FragColor;\n "
83
83
" varying highp vec2 cc_FragTexCoord1;\n "
84
84
" varying highp vec2 cc_FragTexCoord2;\n\n "
85
85
" // End Cocos2D shader header.\n\n " ;
97
97
98
98
static const GLchar *CCFragmentShaderHeader =
99
99
" #ifdef GL_ES\n "
100
- " precision mediump float;\n \n"
100
+ " precision " XSTR(CC_SHADER_DEFAULT_FRAGMENT_PRECISION) " float;\n "
101
101
" #endif\n\n "
102
102
" // End Cocos2D fragment shader header.\n\n " ;
103
103
Original file line number Diff line number Diff line change 130
130
#define CC_SPRITE_DEBUG_DRAW 0
131
131
#endif
132
132
133
+ #ifndef CC_SHADER_COLOR_PRECISION
134
+ #define CC_SHADER_COLOR_PRECISION lowp
135
+ #endif
136
+
137
+ #ifndef CC_SHADER_DEFAULT_FRAGMENT_PRECISION
138
+ #define CC_SHADER_DEFAULT_FRAGMENT_PRECISION mediump
139
+ #endif
140
+
133
141
#ifndef CC_ENABLE_EXPERIMENTAL_EFFECTS
134
142
#define CC_ENABLE_EXPERIMENTAL_EFFECTS 1
135
143
#endif
You can’t perform that action at this time.
0 commit comments