Skip to content

Commit 0ba0ab7

Browse files
committed
[shade] New shader pipeline working with Clay (need to test desktop GL)
1 parent e315da4 commit 0ba0ab7

File tree

32 files changed

+570
-720
lines changed

32 files changed

+570
-720
lines changed

git/shade

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package backend;
2+
3+
/**
4+
* Configuration options for loading shader files in the Clay backend.
5+
*
6+
* These options control how shader files are loaded, supporting both
7+
* synchronous and asynchronous loading patterns for different use cases.
8+
*/
9+
typedef LoadShaderOptions = {
10+
11+
/**
12+
* The loading method to use for this shader resource.
13+
*
14+
* - ASYNC: Load in background (default)
15+
* - SYNC: Block until loaded
16+
*
17+
* @see ceramic.AssetsLoadMethod
18+
*/
19+
@:optional var loadMethod:ceramic.AssetsLoadMethod;
20+
21+
/**
22+
* Optional immediate callback queue for batch processing.
23+
*
24+
* When provided, callbacks are queued for batch execution
25+
* rather than being called immediately, improving performance
26+
* when loading multiple assets.
27+
*/
28+
@:optional var immediate:ceramic.Immediate;
29+
30+
}

plugins/clay/runtime/src/backend/ShaderImpl.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ class ShaderImpl extends clay.graphics.Shader {
4343

4444
/**
4545
* Creates a deep copy of this shader.
46-
*
46+
*
4747
* The cloned shader will have the same source code, attributes,
4848
* and settings but will be a separate GPU resource. This is useful
4949
* for creating shader variations or when multiple materials need
5050
* similar but independent shaders.
51-
*
51+
*
5252
* Note: Currently recompiles the shader source. Future optimization
5353
* could share compiled shader programs between clones.
54-
*
54+
*
5555
* @return A new ShaderImpl instance with the same configuration
5656
*/
5757
public function clone():ShaderImpl {

0 commit comments

Comments
 (0)