16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 22:09:19 +02:00

Syntax error

This commit is contained in:
stele
2021-01-23 21:08:20 +01:00
parent 4f11ead640
commit 0ff083282d

View File

@@ -73,7 +73,7 @@ void main()
vec3 fragnormal = normalize(f_tbn * normalize(vec3(normal.xy + normaldetail.xy, normal.z)));
float reflectivity = param[1].z * normal_map.a;
float specularity = specgloss_map.r;
glossiness = specgloss_map.g * abs(param[1].w);
float glossiness = specgloss_map.g * abs(param[1].w);
float metalic = specgloss_map.b;
fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone);
@@ -127,7 +127,7 @@ vec2 ParallaxMapping(vec2 f_coord, vec3 viewDir)
vec2 prevTexCoords = currentTexCoords + deltaTexCoords; // get texture coordinates before collision (reverse operations)
float afterDepth = currentDepthMapValue - currentLayerDepth; // get depth after and before collision for linear interpolation
float beforeDepth = texture(normalmap, currentTexCoords).b; - currentLayerDepth + layerDepth;
float beforeDepth = texture(normalmap, prevTexCoords).b - currentLayerDepth + layerDepth;
float weight = afterDepth / (afterDepth - beforeDepth); // interpolation of texture coordinates
vec2 finalTexCoords = prevTexCoords * weight + currentTexCoords * (1.0 - weight);