freakin huge circle
This commit is contained in:
@@ -207,9 +207,18 @@ fn ms_debug_edge(){
|
||||
|
||||
for (var i:u32 = 0; i<=N/2; i++){
|
||||
// two half circles that make a whole
|
||||
var offset: vec2<f32> = 0.5 * vec2(cos(f32(i) * tau / f32(N)), sin(f32(i) * tau / f32(N)));
|
||||
mesh_output.vertices[i].position = v0_screen_position + vec4<f32>(offset, 0.0, 0.0);
|
||||
mesh_output.vertices[N/2+1+i].position = v1_screen_position + vec4<f32>(-offset, 0.0, 0.0);
|
||||
var theta: f32 = f32(i) * tau / f32(N);
|
||||
var cos_sin: vec2<f32> = vec2(cos(theta), sin(theta));
|
||||
|
||||
// construct basis vectors
|
||||
var y_axis: vec4<f32> = v0_screen_position - v1_screen_position;
|
||||
var x_axis: vec4<f32> = y_axis.yxzw;
|
||||
x_axis.x = -x_axis.x;
|
||||
|
||||
var offset: vec4<f32> = x_axis * cos_sin.x + y_axis * cos_sin.y;
|
||||
|
||||
mesh_output.vertices[i].position = v0_screen_position + offset;
|
||||
mesh_output.vertices[N/2+1+i].position = v1_screen_position - offset;
|
||||
}
|
||||
|
||||
// max area triangle indices
|
||||
|
||||
Reference in New Issue
Block a user