summaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
authorConnor Thomson <blumatrikz@gmail.com>2026-09-11 08:08:13 -0700
committerConnor Thomson <blumatrikz@gmail.com>2026-09-11 08:08:13 -0700
commit6d5e4308a2ab0ceee2b9311afc92ba449ff81a45 (patch)
tree6020db039f4165fc0f2aa861001e248f4c511254 /shaders
parentdec1d54cd085c631b85e0bc50324eafdfbdd60ef (diff)
Fix some formatting in obj.frag.slang
Diffstat (limited to 'shaders')
-rw-r--r--shaders/obj.frag.slang8
1 files changed, 4 insertions, 4 deletions
diff --git a/shaders/obj.frag.slang b/shaders/obj.frag.slang
index 30832fb..8feab73 100644
--- a/shaders/obj.frag.slang
+++ b/shaders/obj.frag.slang
@@ -32,12 +32,12 @@ static const float specular_strength = 0.6;
static const float shininess = 32.0;
FSOutput main(FSInput input) {
- float3 light_direction = normalize(float3(-0.45, 0.75, 0.55));
- float3 normal = normalize(input.normal);
- float3 view_direction = normalize(input.camera_position - input.world_position);
+ float3 light_direction = normalize(float3(-0.45, 0.75, 0.55));
+ float3 normal = normalize(input.normal);
+ float3 view_direction = normalize(input.camera_position - input.world_position);
float3 reflect_direction = reflect(-light_direction, normal);
- float diffuse = max(dot(normal, light_direction), 0.0);
+ float diffuse = max(dot(normal, light_direction), 0.0);
float specular = diffuse > 0.0 ? pow(max(dot(view_direction, reflect_direction), 0.0), shininess) : 0.0;
float shade = saturate(ambient_strength + diffuse * diffuse_strength + specular * specular_strength);