This commit is contained in:
s473621 2024-03-18 17:34:06 +01:00
parent 380479f9df
commit 8af4e5b15d
3 changed files with 6 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

View File

@ -9,4 +9,4 @@ Ke 0.000000 0.000000 0.000000
Ni 1.450000 Ni 1.450000
d 1.000000 d 1.000000
illum 2 illum 2
map_Kd C:/Users/neryt/meshlab_pl/Picsart_24-03-18_13-47-41-102.jpg map_Kd ./models/Picsart_24-03-18_13-47-41-102.jpg

View File

@ -72,10 +72,11 @@ void main() {
vec3 finalColor = ambient + (diffuse + specular) * NdotL; vec3 finalColor = ambient + (diffuse + specular) * NdotL;
if (dot(finalColor, vec3(0.2126, 0.7152, 0.0722)) > 1.0)
BrightColor = vec4(finalColor, 1.0);
else
BrightColor = vec4(0.0, 0.0, 0.0, 1.0);
float minBrightness = 0.001;
if (dot(finalColor, vec3(0.2126, 0.7152, 0.0722)) < minBrightness)
finalColor = mix(finalColor, vec3(1.0), minBrightness);
BrightColor = vec4(finalColor, 1.0);
outColor = vec4(finalColor, 1.0); outColor = vec4(finalColor, 1.0);
} }