Skip to content

Commit

Permalink
chore: shaders test
Browse files Browse the repository at this point in the history
  • Loading branch information
Arenukvern committed Sep 14, 2024
1 parent 25786c3 commit 2c98f53
Show file tree
Hide file tree
Showing 21 changed files with 66,781 additions and 65,535 deletions.
2 changes: 1 addition & 1 deletion release/web/.last_build_id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dcb4c4d46dfbf7ac7c53695afa8cf371
f3603b0a6c09f04fde5bafbc629a4bbd
2 changes: 1 addition & 1 deletion release/web/assets/AssetManifest.bin

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/web/assets/AssetManifest.bin.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion release/web/assets/AssetManifest.json

Large diffs are not rendered by default.

684 changes: 663 additions & 21 deletions release/web/assets/NOTICES

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions release/web/assets/assets/shaders/background_shader.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"sksl": {
"entrypoint": "background_shader_fragment_main",
"shader": "// This SkSL shader is autogenerated by spirv-cross.\n\nfloat4 flutter_FragCoord;\n\nuniform float uTime;\nuniform vec2 uSize;\nuniform vec2 uMouse;\nuniform shader uTexture;\nuniform half2 uTexture_size;\n\nvec4 fragColor;\n\nvec2 FLT_flutter_local_FlutterFragCoord()\n{\n return flutter_FragCoord.xy;\n}\n\nvec3 FLT_flutter_local_rect(vec2 st, vec2 size, vec2 position, float border, vec3 borderColor, vec3 backgroundColor)\n{\n vec2 adjustedSt = st - position;\n vec2 bl = floor(adjustedSt / size);\n vec2 tr = floor((vec2(1.0) - adjustedSt) / size);\n float inside = ((bl.x * bl.y) * tr.x) * tr.y;\n float outline = step(0.0, inside - border);\n return mix(backgroundColor, borderColor, vec3(outline));\n}\n\nvoid FLT_main()\n{\n vec2 st_1 = FLT_flutter_local_FlutterFragCoord() / uSize;\n vec3 color = vec3(0.0);\n vec2 rectPosition = vec2(uSize.x - 0.100000001490116119384765625, 0.0);\n vec2 param = st_1;\n vec2 param_1 = vec2(0.20000000298023223876953125);\n vec2 param_2 = rectPosition;\n float param_3 = 0.100000001490116119384765625;\n vec3 param_4 = vec3(0.0);\n vec3 param_5 = vec3(0.800000011920928955078125, 0.699999988079071044921875, 0.5);\n vec3 rectColor = FLT_flutter_local_rect(param, param_1, param_2, param_3, param_4, param_5);\n color += rectColor;\n fragColor = vec4(color, 1.0);\n}\n\nhalf4 main(float2 iFragCoord)\n{\n flutter_FragCoord = float4(iFragCoord, 0, 0);\n FLT_main();\n return fragColor;\n}\n",
"stage": 1,
"uniforms": [
{
"array_elements": 0,
"bit_width": 0,
"columns": 1,
"location": 0,
"name": "uTexture",
"rows": 1,
"type": 12
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 1,
"name": "uTime",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 2,
"name": "uSize",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 3,
"name": "uMouse",
"rows": 2,
"type": 10
}
]
}
}
36 changes: 36 additions & 0 deletions release/web/assets/assets/shaders/fog_shader.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"sksl": {
"entrypoint": "fog_shader_fragment_main",
"shader": "// This SkSL shader is autogenerated by spirv-cross.\n\nfloat4 flutter_FragCoord;\n\nuniform float uTime;\nuniform vec2 uSize;\nuniform vec2 uCharacterPos;\n\nvec4 fragColor;\n\nvec2 FLT_flutter_local_FlutterFragCoord()\n{\n return flutter_FragCoord.xy;\n}\n\nfloat FLT_flutter_local_noise(vec2 st)\n{\n return fract(sin(dot(st, vec2(12.98980045318603515625, 78.233001708984375))) * 43758.546875);\n}\n\nfloat FLT_flutter_local_fbm(inout vec2 st)\n{\n float value = 0.0;\n float amplitude = 0.5;\n for (int i = 0; i < 5; i++)\n {\n vec2 param = st;\n value += (amplitude * FLT_flutter_local_noise(param));\n st *= 2.0;\n amplitude *= 0.5;\n }\n return value;\n}\n\nvoid FLT_main()\n{\n vec2 st_1 = FLT_flutter_local_FlutterFragCoord() / uSize;\n vec2 characterNorm = uCharacterPos / uSize;\n float distance = length(st_1 - characterNorm);\n float smoothRadius = 2.0 / max(uSize.x, uSize.y);\n float alpha = smoothstep(smoothRadius, smoothRadius + 0.100000001490116119384765625, distance);\n fragColor = vec4(0.0, 0.0, 0.0, alpha);\n vec2 param_1 = (st_1 * 3.0) + vec2(uTime * 8.9999997499035089276731014251709e-07);\n float _124 = FLT_flutter_local_fbm(param_1);\n float n = _124;\n float cloudDensity = 2.0;\n float cloudStrength = exp(distance * cloudDensity) * n;\n vec4 cloudColor = vec4(0.800000011920928955078125, 0.800000011920928955078125, 0.800000011920928955078125, 1.0);\n fragColor = cloudColor * cloudStrength;\n}\n\nhalf4 main(float2 iFragCoord)\n{\n flutter_FragCoord = float4(iFragCoord, 0, 0);\n FLT_main();\n return fragColor;\n}\n",
"stage": 1,
"uniforms": [
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 0,
"name": "uTime",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 1,
"name": "uSize",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 2,
"name": "uCharacterPos",
"rows": 2,
"type": 10
}
]
}
}
45 changes: 45 additions & 0 deletions release/web/assets/assets/shaders/fragment_shader.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"sksl": {
"entrypoint": "fragment_shader_fragment_main",
"shader": "// This SkSL shader is autogenerated by spirv-cross.\n\nfloat4 flutter_FragCoord;\n\nuniform float uTime;\nuniform vec2 uSize;\nuniform vec2 uMouse;\nuniform shader uTexture;\nuniform half2 uTexture_size;\n\nvec4 fragColor;\n\nvec2 FLT_flutter_local_FlutterFragCoord()\n{\n return flutter_FragCoord.xy;\n}\n\nvec3 FLT_flutter_local_rect(vec2 st, vec2 size, vec2 position, float border, vec3 borderColor, vec3 backgroundColor)\n{\n vec2 adjustedSt = st - position;\n vec2 bl = floor(adjustedSt / size);\n vec2 tr = floor((vec2(1.0) - adjustedSt) / size);\n float inside = ((bl.x * bl.y) * tr.x) * tr.y;\n float outline = step(0.0, inside - border);\n return mix(backgroundColor, borderColor, vec3(outline));\n}\n\nvoid FLT_main()\n{\n vec2 st_1 = FLT_flutter_local_FlutterFragCoord() / uSize;\n vec3 color = vec3(0.0);\n vec2 rectPosition = vec2(uSize.x - 0.100000001490116119384765625, 0.0);\n vec2 param = st_1;\n vec2 param_1 = vec2(0.20000000298023223876953125);\n vec2 param_2 = rectPosition;\n float param_3 = 0.100000001490116119384765625;\n vec3 param_4 = vec3(0.0);\n vec3 param_5 = vec3(0.800000011920928955078125, 0.699999988079071044921875, 0.5);\n vec3 rectColor = FLT_flutter_local_rect(param, param_1, param_2, param_3, param_4, param_5);\n color += rectColor;\n fragColor = vec4(color, 1.0);\n}\n\nhalf4 main(float2 iFragCoord)\n{\n flutter_FragCoord = float4(iFragCoord, 0, 0);\n FLT_main();\n return fragColor;\n}\n",
"stage": 1,
"uniforms": [
{
"array_elements": 0,
"bit_width": 0,
"columns": 1,
"location": 0,
"name": "uTexture",
"rows": 1,
"type": 12
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 1,
"name": "uTime",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 2,
"name": "uSize",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 3,
"name": "uMouse",
"rows": 2,
"type": 10
}
]
}
}
27 changes: 27 additions & 0 deletions release/web/assets/assets/shaders/snow_shader.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"sksl": {
"entrypoint": "snow_shader_fragment_main",
"shader": "// This SkSL shader is autogenerated by spirv-cross.\n\nfloat4 flutter_FragCoord;\n\nuniform float uTime;\nuniform vec2 uSize;\n\nvec4 fragColor;\n\nvec2 FLT_flutter_local_FlutterFragCoord()\n{\n return flutter_FragCoord.xy;\n}\n\nfloat FLT_flutter_local_superSnowyTime(float time, vec2 screenCoords)\n{\n return cos(time) * 400.0;\n}\n\nfloat FLT_flutter_local_superSnowyEffectRandom(vec2 st)\n{\n float param = uTime;\n vec2 param_1 = st;\n float time = FLT_flutter_local_superSnowyTime(param, param_1);\n return fract((sin(dot(vec2(time) + st, vec2(time) + vec2(sin(time / 5000000.0), sin(time / 5000000.0)))) * 30000.0) / 0.300000011920928955078125);\n}\n\nvec4 FLT_flutter_local_superSnowyEffect(vec2 st)\n{\n vec2 param = st;\n float rnd = FLT_flutter_local_superSnowyEffectRandom(param);\n float alpha = smoothstep(0.0, 0.4000000059604644775390625, rnd) * smoothstep(0.4000000059604644775390625, 0.0, rnd);\n vec3 color = vec3(1.0, 0.800000011920928955078125, 0.5) * alpha;\n return vec4(vec3(rnd) / vec3(1.0, 0.800000011920928955078125, 0.5), alpha);\n}\n\nvoid FLT_main()\n{\n vec2 st_1 = FLT_flutter_local_FlutterFragCoord() / uSize;\n vec2 param_1 = st_1;\n vec4 color_1 = FLT_flutter_local_superSnowyEffect(param_1);\n fragColor = color_1;\n}\n\nhalf4 main(float2 iFragCoord)\n{\n flutter_FragCoord = float4(iFragCoord, 0, 0);\n FLT_main();\n return fragColor;\n}\n",
"stage": 1,
"uniforms": [
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 0,
"name": "uTime",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 1,
"name": "uSize",
"rows": 2,
"type": 10
}
]
}
}
Binary file added release/web/assets/assets/shaders_assets/sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified release/web/assets/fonts/MaterialIcons-Regular.otf
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 2c98f53

Please sign in to comment.