Revision edd8d7a7
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/effect/PostprocessEffectBlur.java | ||
---|---|---|
170 | 170 |
" { \n"+ |
171 | 171 |
" v_TexCoord = a_TexCoord; \n"+ |
172 | 172 |
" gl_Position= vec4(2.0*a_Position,u_Depth,1.0); \n"+ |
173 |
"}"; |
|
173 |
" }";
|
|
174 | 174 |
|
175 | 175 |
final String blurFragment1 = |
176 | 176 |
|
... | ... | |
192 | 192 |
" pixel += ( texture(u_ColorTexture,vec2(v_TexCoord.x+u_Offsets[i],v_TexCoord.y)) + \n"+ |
193 | 193 |
" texture(u_ColorTexture,vec2(v_TexCoord.x-u_Offsets[i],v_TexCoord.y)) ) * u_Weights[i]; \n"+ |
194 | 194 |
" } \n"+ |
195 |
"fragColor = pixel; \n"+
|
|
196 |
"}"; |
|
195 |
" fragColor = pixel; \n"+
|
|
196 |
" }";
|
|
197 | 197 |
|
198 | 198 |
final String blurFragment2 = |
199 | 199 |
|
... | ... | |
215 | 215 |
" pixel += ( texture(u_ColorTexture,vec2(v_TexCoord.x,v_TexCoord.y+u_Offsets[i])) + \n"+ |
216 | 216 |
" texture(u_ColorTexture,vec2(v_TexCoord.x,v_TexCoord.y-u_Offsets[i])) ) * u_Weights[i]; \n"+ |
217 | 217 |
" } \n"+ |
218 |
"fragColor = pixel; \n"+
|
|
219 |
"}"; |
|
218 |
" fragColor = pixel; \n"+
|
|
219 |
" }";
|
|
220 | 220 |
|
221 | 221 |
mBlur1Index = PostprocessEffect.register("BLUR1", blurVertex,blurFragment1); |
222 | 222 |
mBlur2Index = PostprocessEffect.register("BLUR2", blurVertex,blurFragment2); |
Also available in: Unified diff
Minor