mirror of
https://github.com/Nexoniarz/Fry3DX.git
synced 2026-11-03 20:44:26 +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
20 lines
571 B
GLSL
20 lines
571 B
GLSL
#version 460
|
|
#include "backend.glsl"
|
|
PUSH_BLOCK {
|
|
mat4 viewProj;
|
|
vec4 center;
|
|
vec4 extents;
|
|
vec4 color;
|
|
} pc;
|
|
|
|
layout(location = 0) in vec3 v_normal;
|
|
layout(location = 1) in vec3 v_world;
|
|
layout(location = 0) out vec4 o_color;
|
|
|
|
void main() {
|
|
// World-space UVs: textures tile every 128 units regardless of box size.
|
|
vec3 n = abs(v_normal);
|
|
vec2 uv = (n.x > 0.5 ? v_world.yz : n.y > 0.5 ? v_world.xz : v_world.xy) / 128.0;
|
|
vec4 tex = sampleTex(uint(pc.center.w), uv);
|
|
o_color = vec4(pc.color.rgb * tex.rgb * sunLight(v_normal), 1.0);
|
|
}
|