feat(art): add storybook meadow and woodland villagers
This commit is contained in:
@@ -10,8 +10,10 @@ uniform float flutter_strength : hint_range(0.0, 0.05) = 0.012;
|
||||
uniform float wind_phase : hint_range(0.0, 6.2832) = 0.0;
|
||||
uniform vec3 albedo : source_color = vec3(0.19, 0.38, 0.17);
|
||||
uniform float roughness : hint_range(0.0, 1.0) = 0.9;
|
||||
varying vec3 paint_position;
|
||||
|
||||
void vertex() {
|
||||
paint_position = VERTEX;
|
||||
float half_height = 1.2;
|
||||
float height_factor = clamp((VERTEX.y + half_height) / (half_height * 2.0), 0.0, 1.0);
|
||||
height_factor = height_factor * height_factor;
|
||||
@@ -29,6 +31,17 @@ void vertex() {
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
ALBEDO = albedo;
|
||||
float patches = sin(paint_position.x * 6.0 + sin(paint_position.z * 7.0)) * sin(paint_position.y * 5.0);
|
||||
float top = smoothstep(-0.65, 0.8, paint_position.y);
|
||||
ALBEDO = albedo * mix(0.85, 1.17, top) * (1.0 + smoothstep(0.2, 0.4, patches) * 0.10);
|
||||
ROUGHNESS = roughness;
|
||||
SPECULAR = 0.0;
|
||||
}
|
||||
|
||||
void light() {
|
||||
float band = smoothstep(0.08, 0.18, dot(NORMAL, LIGHT));
|
||||
float highlight = smoothstep(0.62, 0.74, dot(NORMAL, LIGHT));
|
||||
vec3 tone = mix(vec3(0.32, 0.48, 0.39), vec3(0.87, 0.92, 0.72), band);
|
||||
tone = mix(tone, vec3(1.12, 1.08, 0.82), highlight);
|
||||
DIFFUSE_LIGHT += tone * ATTENUATION * LIGHT_COLOR / PI;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user