diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-28 02:39:04 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-28 02:39:04 +0100 |
| commit | 472c2258dbeca000a454ea1781f09df63477563e (patch) | |
| tree | 98ac75c3824f19f4a598a807b3cb6aa13e8cb0c3 /src/tests/gpu/test_noise_functions.cc | |
| parent | 1c5a9fb7b8c704a59ec58894adf46d73d1615072 (diff) | |
replace wgsl type: vec4<f32> -> vec4f ..
Diffstat (limited to 'src/tests/gpu/test_noise_functions.cc')
| -rw-r--r-- | src/tests/gpu/test_noise_functions.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tests/gpu/test_noise_functions.cc b/src/tests/gpu/test_noise_functions.cc index d96a982..3c6cc52 100644 --- a/src/tests/gpu/test_noise_functions.cc +++ b/src/tests/gpu/test_noise_functions.cc @@ -21,16 +21,16 @@ static bool test_noise_shader_loading() { // Check for key function signatures const char* expected_funcs[] = { "fn hash_1f(x: f32) -> f32", - "fn hash_2f(p: vec2<f32>) -> f32", - "fn hash_3f(p: vec3<f32>) -> f32", - "fn hash_2f_2f(p: vec2<f32>) -> vec2<f32>", - "fn hash_3f_3f(p: vec3<f32>) -> vec3<f32>", + "fn hash_2f(p: vec2f) -> f32", + "fn hash_3f(p: vec3f) -> f32", + "fn hash_2f_2f(p: vec2f) -> vec2f", + "fn hash_3f_3f(p: vec3f) -> vec3f", "fn hash_1u(p: u32) -> f32", - "fn noise_2d(p: vec2<f32>) -> f32", - "fn noise_3d(p: vec3<f32>) -> f32", - "fn gyroid(p: vec3<f32>) -> f32", - "fn fbm_2d(p: vec2<f32>, octaves: i32) -> f32", - "fn fbm_3d(p: vec3<f32>, octaves: i32) -> f32", + "fn noise_2d(p: vec2f) -> f32", + "fn noise_3d(p: vec3f) -> f32", + "fn gyroid(p: vec3f) -> f32", + "fn fbm_2d(p: vec2f, octaves: i32) -> f32", + "fn fbm_3d(p: vec3f, octaves: i32) -> f32", }; int func_count = sizeof(expected_funcs) / sizeof(expected_funcs[0]); @@ -63,11 +63,11 @@ static bool test_noise_composition() { #include "math/noise" @fragment - fn fs_main(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> { + fn fs_main(@location(0) uv: vec2f) -> @location(0) vec4f { let h = hash_2f(uv); let n = noise_2d(uv * 4.0); let fbm = fbm_2d(uv * 2.0, 3); - return vec4<f32>(fbm, fbm, fbm, 1.0); + return vec4f(fbm, fbm, fbm, 1.0); } )"; |
