use only uniform vec2
This commit is contained in:
parent
5494d40134
commit
fbb766acd7
@ -190,13 +190,9 @@ Item {
|
|||||||
"varying highp vec2 qt_TexCoord0;" +
|
"varying highp vec2 qt_TexCoord0;" +
|
||||||
"void main() {" +
|
"void main() {" +
|
||||||
|
|
||||||
"highp vec2 wave = vec2(qt_TexCoord0.x - dx*0.0025" +
|
" highp vec2 tmp = 1.0 / (1.0 + abs(qt_TexCoord0 - vec2(startX, startY)));" +
|
||||||
" * (1.0/(1.0+abs(qt_TexCoord0.x-(startX))))" +
|
" vec2 wave = qt_TexCoord0 - vec2(dx, dy) * 0.0025 * tmp.xx * tmp.yy;" +
|
||||||
" * (1.0/(1.0+abs(qt_TexCoord0.y-(startY))))," +
|
" gl_FragColor = texture2D(source, wave);" +
|
||||||
" qt_TexCoord0.y - dy*0.0025" +
|
|
||||||
" * 1.0/(1.0+abs(qt_TexCoord0.x-(startX)))" +
|
|
||||||
" * 1.0/(1.0+abs(qt_TexCoord0.y-(startY))));" +
|
|
||||||
"gl_FragColor = texture2D(source, wave);" +
|
|
||||||
"}"
|
"}"
|
||||||
}
|
}
|
||||||
//! [fragment]
|
//! [fragment]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user