-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bubbling_observers
- Loading branch information
Showing
370 changed files
with
10,169 additions
and
3,497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"MD013": false | ||
"MD013": false, | ||
"no-inline-html": { | ||
"allowed_elements": [ | ||
"details", | ||
"summary" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// `custom_phase_item.wgsl` | ||
// | ||
// This shader goes with the `custom_phase_item` example. It demonstrates how to | ||
// enqueue custom rendering logic in a `RenderPhase`. | ||
|
||
// The GPU-side vertex structure. | ||
struct Vertex { | ||
// The world-space position of the vertex. | ||
@location(0) position: vec3<f32>, | ||
// The color of the vertex. | ||
@location(1) color: vec3<f32>, | ||
}; | ||
|
||
// Information passed from the vertex shader to the fragment shader. | ||
struct VertexOutput { | ||
// The clip-space position of the vertex. | ||
@builtin(position) clip_position: vec4<f32>, | ||
// The color of the vertex. | ||
@location(0) color: vec3<f32>, | ||
}; | ||
|
||
// The vertex shader entry point. | ||
@vertex | ||
fn vertex(vertex: Vertex) -> VertexOutput { | ||
// Use an orthographic projection. | ||
var vertex_output: VertexOutput; | ||
vertex_output.clip_position = vec4(vertex.position.xyz, 1.0); | ||
vertex_output.color = vertex.color; | ||
return vertex_output; | ||
} | ||
|
||
// The fragment shader entry point. | ||
@fragment | ||
fn fragment(vertex_output: VertexOutput) -> @location(0) vec4<f32> { | ||
return vec4(vertex_output.color, 1.0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// This shader draws a circle with a given input color | ||
#import bevy_ui::ui_vertex_output::UiVertexOutput | ||
|
||
@group(1) @binding(0) var<uniform> color: vec4<f32>; | ||
@group(1) @binding(1) var<uniform> slider: f32; | ||
@group(1) @binding(2) var material_color_texture: texture_2d<f32>; | ||
@group(1) @binding(3) var material_color_sampler: sampler; | ||
|
||
|
||
@fragment | ||
fn fragment(in: UiVertexOutput) -> @location(0) vec4<f32> { | ||
if in.uv.x < slider { | ||
let output_color = textureSample(material_color_texture, material_color_sampler, in.uv) * color; | ||
return output_color; | ||
} else { | ||
return vec4(0.0); | ||
} | ||
} |
Oops, something went wrong.