ISF - Distortion - Triangle Warp
void main(){
vec4 inputPixelColor = vec4(0.0);
vec2 pt = (isf_FragNormCoord.xy);
float val = 0.0;
if (pt.x < peakPoint.x) {
pt.x = pt.x * 0.5 / peakPoint.x;
val = 2.0 * pt.x * peakPoint.y;
}
else {
pt.x = 0.5 + 0.5 * (pt.x - peakPoint.x) / (1.0 - peakPoint.x);
val = (2.0 - 2.0 * pt.x) * peakPoint.y;
}
if (pt.y <= val) {
pt.x = mix((isf_FragNormCoord.xy).x,pt.x,distortX);
pt.y /= val;
inputPixelColor = IMG_NORM_PIXEL(inputImage, pt);
}
gl_FragColor = inputPixelColor;
}