1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! GLSL Transpiler (Deep Fried Edition)
//!
//! This module provides GLSL code generation for SDF trees.
//! Output is compatible with:
//!
//! - **Unity**: Shader Graph Custom Function, URP/HDRP shaders
//! - **OpenGL 4.x**: Compute shaders and fragment shaders
//! - **Vulkan**: GLSL shaders via glslang/SPIRV-Cross
//! - **Shadertoy**: Fragment shader for web-based visualization
//!
//! # Usage
//!
//! ```rust,ignore
//! use alice_sdf::prelude::*;
//! use alice_sdf::compiled::glsl::GlslShader;
//!
//! let shape = SdfNode::sphere(1.0)
//! .smooth_union(SdfNode::box3d(0.5, 0.5, 0.5), 0.2);
//!
//! // Generate GLSL code
//! let shader = GlslShader::transpile(&shape);
//!
//! // For Unity Shader Graph Custom Function
//! let unity_code = shader.to_unity_custom_function();
//! println!("{}", unity_code);
//!
//! // For Shadertoy-style fragment shader
//! let fragment = shader.to_fragment_shader();
//! println!("{}", fragment);
//!
//! // For OpenGL Compute Shader
//! let compute = shader.to_compute_shader();
//! println!("{}", compute);
//! ```
//!
//! Author: Moroya Sakamoto
pub use RenderConfig;
pub use ;