GUI: new osc renderer, part 21

part 11? I must have been drunk
alternate approach for OpenGL ES (no more hangs)
This commit is contained in:
tildearrow 2024-02-19 15:49:56 -05:00
parent 89249d4a2b
commit cfee9b3810
6 changed files with 82 additions and 40 deletions

View file

@ -116,7 +116,8 @@ const char* sh_oscRender_srcF=
" float slope=abs(valmax-valmin)*uResolution.y*0.5;\n"
" float slopeDiv=min(uAdvance,(uAdvance/slope));\n"
" float xRight=uv.x+((uLineWidth)/uResolution.x);\n"
" for (float x=max(0.0,uv.x-(uLineWidth/uResolution.x)); x<=xRight; x+=slopeDiv) {\n"
" for (float s=0.0; s<max(1,slope); s+=1.0) {\n"
" float x=max(0.0,uv.x-(uLineWidth/uResolution.x)+s*slopeDiv);\n"
" float val=texture2D(oscVal,vec2(x,1.0)).x*uResolution.y*0.5;\n"
" alpha+=clamp(uLineWidth-distance(vec2(fur_fragCoord.x,fur_fragCoord.y),vec2(x*uResolution.x,val)),0.0,1.0);\n"
" }\n"