mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Update integers to float32 (#64)
This commit is contained in:
@@ -26,7 +26,7 @@ fn vtx_main() -> void {
|
||||
var pos : vec2<f32> = vec2<f32>(
|
||||
(a_pos.x * std::cos(angle)) - (a_pos.y * std::sin(angle)),
|
||||
(a_pos.x * std::sin(angle)) + (a_pos.y * std::cos(angle)));
|
||||
gl_Position = vec4<f32>(pos + a_particlePos, 0, 1);
|
||||
gl_Position = vec4<f32>(pos + a_particlePos, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
entry_point vertex as "main" = vtx_main;
|
||||
@@ -76,9 +76,9 @@ fn compute_main() -> void {
|
||||
var vPos : vec2<f32> = particlesA.particles[index].pos;
|
||||
var vVel : vec2<f32> = particlesA.particles[index].vel;
|
||||
|
||||
var cMass : vec2<f32> = vec2<f32>(0, 0);
|
||||
var cVel : vec2<f32> = vec2<f32>(0, 0);
|
||||
var colVel : vec2<f32> = vec2<f32>(0, 0);
|
||||
var cMass : vec2<f32> = vec2<f32>(0.0, 0.0);
|
||||
var cVel : vec2<f32> = vec2<f32>(0.0, 0.0);
|
||||
var colVel : vec2<f32> = vec2<f32>(0.0, 0.0);
|
||||
var cMassCount : i32 = 0;
|
||||
var cVelCount : i32 = 0;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ entry_point vertex as "main" = main_vert;
|
||||
[[location 0]] var<out> o_color : vec4<f32>;
|
||||
|
||||
fn main_frag() -> void {
|
||||
o_color = vec4<f32>(1, 0, 0, 1); #TODO: sample
|
||||
o_color = vec4<f32>(1.0, 0.0, 0.0, 1.0); #TODO: sample
|
||||
return;
|
||||
}
|
||||
entry_point fragment as "main" = main_frag;
|
||||
|
||||
Reference in New Issue
Block a user