aboutsummaryrefslogtreecommitdiff
path: root/Assets/Shaders
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-21 18:49:50 +0200
committerhachem <im@hachem.wtf>2025-08-21 18:49:50 +0200
commit1bd39d11ff76e61bc3cc8b58286092a84997cc20 (patch)
tree490b5c8a1c18fdd0ee42b74c918511c2ad2a6533 /Assets/Shaders
parent137a13e6f9a2b039b486b74747dfa83da30413aa (diff)
[add]: finish most world builder features
Diffstat (limited to 'Assets/Shaders')
-rw-r--r--Assets/Shaders/Sphere.glsl5
1 files changed, 2 insertions, 3 deletions
diff --git a/Assets/Shaders/Sphere.glsl b/Assets/Shaders/Sphere.glsl
index 026f884..23e8f54 100644
--- a/Assets/Shaders/Sphere.glsl
+++ b/Assets/Shaders/Sphere.glsl
@@ -46,19 +46,18 @@ void main()
float diff = max(dot(normal, lightDir), 0.0);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), 32.0);
- vec3 ambient = u_Color * 0.1;
vec3 diffuse = u_Color * diff;
vec3 specular = vec3(u_Specular) * spec;
vec3 emission = u_Color * u_Emission;
- vec3 result = ambient + diffuse + specular + emission;
+ vec3 result = diffuse + specular + emission;
if (u_IsSelected > 0)
{
float ndotv = max(dot(normal, viewDir), 0.0);
float rim = 1.0 - ndotv;
float width = clamp(u_OutlineWidth, 0.0, 1.0);
- float outlineMask = smoothstep(1.0 - width, 1.0, rim);
+ float outlineMask = step(1.0 - u_OutlineWidth, rim);;
result = mix(result, u_OutlineColor, outlineMask);
}