Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
brendan-duncan committed Nov 5, 2023
1 parent 18f0de2 commit 713ad94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const reflect = new WgslReflect(shader_code);
class WgslReflect {
/// All top-level uniform vars in the shader.
uniforms: Array<VariableInfo>;
/// All top-level storage vars in the shader.
/// All top-level storage vars in the shader, including storage buffers and textures.
storage: Array<VariableInfo>;
/// All top-level texture vars in the shader;
textures: Array<VariableInfo>;
Expand All @@ -47,6 +47,7 @@ enum ResourceType {
Storage,
Texture,
Sampler,
StorageTexture
}

class VariableInfo {
Expand All @@ -55,6 +56,7 @@ class VariableInfo {
group: number; // The binding group of the variable
binding: number; // The binding index of the variable
resourceType: ResourceType; // The resource type of the variable
access: string; // "", read, write, read_write

get isArray(): boolean; // True if it's an array type
get isStruct(): boolean; // True if it's a struct type
Expand Down Expand Up @@ -89,6 +91,7 @@ class ArrayInfo extends TypeInfo {

class TemplateInfo extends TypeInfo {
format: TypeInfo;
access: string; // "", read, write, read_write
}

class MemberInfo {
Expand Down

0 comments on commit 713ad94

Please sign in to comment.