mirror of
https://github.com/Nexoniarz/Fry3DX.git
synced 2026-11-03 12:34:27 +00:00
Shapes with live settings, shape editing, knife and hole tools, drawing shapes onto other objects, combining objects (add / subtract / overlap), copies, thickness, painting with stickers and layers, a Layout tab, a Print tab with checks, packed .fry files with autosave, export to GLB, glTF, FBX, OBJ, 3MF, STL and PLY, folders in Layers, its own crash screen, and a website for GitHub Pages in docs/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMSrd5oe1GpUD7E6d825KP
25 lines
874 B
GLSL
25 lines
874 B
GLSL
#version 460
|
||
// Bloom, coming up: a 3×3 tent of the smaller level, added onto the larger one (blended).
|
||
#define KEEL_POST // screen-space: render targets, sampled clamped
|
||
#include "backend.glsl"
|
||
PUSH_BLOCK {
|
||
uint src;
|
||
uint srcW, srcH;
|
||
uint outW, outH;
|
||
float radius;
|
||
} pc;
|
||
layout(location = 0) out vec4 o_color;
|
||
|
||
vec3 tap(vec2 uv) {
|
||
vec2 h = 0.5 / vec2(pc.srcW, pc.srcH);
|
||
return sampleTex(pc.src, clamp(uv, h, 1.0 - h)).rgb;
|
||
}
|
||
|
||
void main() {
|
||
vec2 uv = gl_FragCoord.xy / vec2(pc.outW, pc.outH);
|
||
vec2 t = pc.radius / vec2(pc.srcW, pc.srcH);
|
||
vec3 s = tap(uv) * 4.0;
|
||
s += (tap(uv + vec2(-t.x, 0)) + tap(uv + vec2(t.x, 0)) + tap(uv + vec2(0, -t.y)) + tap(uv + vec2(0, t.y))) * 2.0;
|
||
s += tap(uv + vec2(-t.x, -t.y)) + tap(uv + vec2(t.x, -t.y)) + tap(uv + vec2(-t.x, t.y)) + tap(uv + vec2(t.x, t.y));
|
||
o_color = vec4(s / 16.0, 1.0);
|
||
}
|