@@ -62,8 +62,7 @@ uniform highp sampler2DArray _control_maps : repeat_disable;
6262
6363// Public uniforms
6464// INSERT: AUTO_SHADER_UNIFORMS
65-
66- uniform float height_sharpness : hint_range(0.0 , 1.0 , 0.01 ) = 0.5 ;
65+ uniform float displacement_sharpness : hint_range(0.0 , 1.0 , 0.01 ) = 0.5 ;
6766uniform bool vertical_projection = true;
6867uniform float projection_threshold : hint_range(0.0 , 0.99 , 0.01 ) = 0.8 ;
6968
@@ -168,7 +167,7 @@ void accumulate_material(const mat3 TNB, const float weight, const ivec3 index,
168167 #define FAST_WORLD_NORMAL(n) fma(TNB[0 ], vec3 (n.x), fma(TNB[2 ], vec3 (n.z), TNB[1 ] * vec3 (n.y)))
169168
170169 float blend = DECODE_BLEND(control); // only used for branching.
171- float sharpness = fma(11 ., height_sharpness , 1 .);
170+ float sharpness = fma(11 ., displacement_sharpness , 1 .);
172171
173172 // 1st Texture Asset ID
174173 if (blend < 1.0 ) {
@@ -370,10 +369,7 @@ void fragment() {
370369 mat.albedo_height *= weight_inv;
371370
372371 // Output
373- // Displacement Direction Vector3 (reconstructed from XZ when used later)
374- COLOR.rg = fma(w_normal.xz, vec2 (0.5 ), vec2 (0.5 ));
375- // Displacement Ammount -0.5 to 0.5, stored in 0.0 - 1.0 Range
376- COLOR.b = mat.albedo_height.a;
372+ COLOR.rgb = fma(w_normal * (mat.albedo_height.a - 0.5 ), vec3 (0.5 ), vec3 (0.5 ));
377373
378374}
379375)"
0 commit comments