summaryrefslogtreecommitdiff
path: root/workspaces/main/shaders/scene1.wgsl
diff options
context:
space:
mode:
Diffstat (limited to 'workspaces/main/shaders/scene1.wgsl')
-rw-r--r--workspaces/main/shaders/scene1.wgsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/workspaces/main/shaders/scene1.wgsl b/workspaces/main/shaders/scene1.wgsl
index 8cc36cd..035f2e9 100644
--- a/workspaces/main/shaders/scene1.wgsl
+++ b/workspaces/main/shaders/scene1.wgsl
@@ -23,7 +23,7 @@ const sunDir1 = vec3f(0.0, 0.04997, -0.99875); // normalize(0, 0.05, -1)
const lightPos1 = vec3f(10.0, 10.0, 10.0);
const lightPos2 = vec3f(-10.0, 10.0, -10.0);
-fn rayPlane(ray: Ray, plane: vec4<f32>) -> f32 {
+fn rayPlane(ray: Ray, plane: vec4f) -> f32 {
return (dot(ray.origin, plane.xyz) - plane.w) / dot(ray.direction, plane.xyz);
}
@@ -40,7 +40,7 @@ fn render0(ray: Ray) -> vec3f {
if (tp1 > 0.0) {
let pos = ray.origin + tp1 * ray.direction;
let pp = pos.xz;
- let db = sdBox2D(pp, vec2<f32>(5.0, 9.0)) - 3.0;
+ let db = sdBox2D(pp, vec2f(5.0, 9.0)) - 3.0;
col += vec3f(4.0) * skyCol * y * y * smoothstep(0.25, 0.0, db);
col += vec3f(0.8) * skyCol * exp(-0.5 * max(db, 0.0));
}
@@ -155,7 +155,7 @@ fn render1(ray: Ray) -> vec3f {
#include "render/fullscreen_vs"
-@fragment fn fs_main(@builtin(position) p: vec4<f32>) -> @location(0) vec4<f32> {
+@fragment fn fs_main(@builtin(position) p: vec4f) -> @location(0) vec4f {
let coord = getScreenCoord(p, uniforms.resolution);
let ray = getCameraRay(camera, coord);
var col = render1(ray);