kitgit

tirbofish/dropbear · commit

ac07aa8f3e9b449b294258d953f35e413560e54a

feature: improved shaders, way nicer looking.

Unverified

Thribhu K <4tkbytes@pm.me> · 2026-03-25 11:42

view full diff

diff --git a/crates/dropbear-engine/src/shaders/shader.wgsl b/crates/dropbear-engine/src/shaders/shader.wgsl
index af3e4f6..84f7b3f 100644
--- a/crates/dropbear-engine/src/shaders/shader.wgsl
+++ b/crates/dropbear-engine/src/shaders/shader.wgsl
@@ -1,100 +1,80 @@
 const PI: f32 = 3.14159265358979;
 
 struct Globals {
-    num_lights: u32,
+    num_lights:       u32,
     ambient_strength: f32,
 }
 
 struct CameraUniform {
-    view_pos: vec4<f32>,
-    view: mat4x4<f32>,
+    view_pos:  vec4<f32>,
+    view:      mat4x4<f32>,
     view_proj: mat4x4<f32>,
-    inv_proj: mat4x4<f32>,
-    inv_view: mat4x4<f32>,
+    inv_proj:  mat4x4<f32>,
+    inv_view:  mat4x4<f32>,
 }
 
 struct Light {
-    position: vec4<f32>,
+    position:  vec4<f32>,
     direction: vec4<f32>, // x, y, z, outer_cutoff_angle
-    color: vec4<f32>,     // r, g, b, light_type (0=directional, 1=point, 2=spot)
-    constant: f32,
-    lin: f32,
+    color:     vec4<f32>, // r, g, b, light_type (0=directional, 1=point, 2=spot)
+    constant:  f32,
+    lin:       f32,
     quadratic: f32,
-    cutoff: f32,
+    cutoff:    f32,
 }
 
 struct MaterialUniform {
-    base_colour: vec4<f32>,
-    emissive: vec3<f32>,
+    base_colour:       vec4<f32>,
+    emissive:          vec3<f32>,
     emissive_strength: f32,
-    metallic: f32,
-    roughness: f32,
-    normal_scale: f32,
+    metallic:          f32,

Large diffs are not rendered by default. Showing the first 50 of 440 lines. Show full diff