You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i ported the shader to be used in .net maui my shadow couldn't perform realistically on a background other than black, so i have corrected that by passing margins that surround the image. My texture to be folded consists of an image surrounded by transparent margins.. Maybe might be missing something, ready for that.
Also wanted to have a backside texture to be shown when front texture curls. Could well be optional..
adding uniform for backside texture uniform sampler2D imageBackside;
using it in two places:
line 106: fragColor = texture(imageBackside, p2 / resolution);
line 122: fragColor = texture(imageBackside, p / resolution);
Unfortunately can't create a push myself as i never used flutter and my outdated v2 sksl couldn't be used by flutter, hoping the provided info will still be helpful.
Using skia v2 in .net (v3 bindings still in preview) and flutter might be using v3, so my script is just full of workarounds. Just for the fun of it:
When i ported the shader to be used in .net maui my shadow couldn't perform realistically on a background other than black, so i have corrected that by passing margins that surround the image. My texture to be folded consists of an image surrounded by transparent margins.. Maybe might be missing something, ready for that.
Also wanted to have a backside texture to be shown when front texture curls. Could well be optional..
devenv_xFyDNzgFoW.mp4
Proposing to edit:
https://github.com/Rahiche/riveo_page_curl/blob/main/shaders/page_curl.frag
adding uniform for backside texture
uniform float4 iMargins;
using it in two places:
inserting in the beginning of
inRect
:then inside the main:
and consuming it in line 111 replacing:
fragColor = vec4(0.0, 0.0, 0.0, 0.5);
with:
adding uniform for backside texture
uniform sampler2D imageBackside;
using it in two places:
line 106:
fragColor = texture(imageBackside, p2 / resolution);
line 122:
fragColor = texture(imageBackside, p / resolution);
Unfortunately can't create a push myself as i never used flutter and my outdated v2 sksl couldn't be used by flutter, hoping the provided info will still be helpful.
Using skia v2 in .net (v3 bindings still in preview) and flutter might be using v3, so my script is just full of workarounds. Just for the fun of it:
The text was updated successfully, but these errors were encountered: