Update integers to float32 (#64)

This commit is contained in:
Timo de Kort
2020-06-13 19:05:30 +02:00
committed by GitHub
parent f94b486d8b
commit f9fa281da5
2 changed files with 5 additions and 5 deletions

View File

@@ -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;

View File

@@ -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;