added weighted random item drops based on player needs

This commit is contained in:
derek
2025-01-17 14:43:51 -06:00
parent cafcf57ef1
commit 5eb065830a
9 changed files with 83 additions and 31 deletions

View File

@@ -37,7 +37,7 @@ vec2 rotate_uv(vec2 uv, vec2 pivot, float rotation) {
uv -= pivot;
return vec2(
cosa * uv.x - sina * uv.y,
cosa * uv.y + sina * uv.x
cosa * uv.y + sina * uv.x
) + pivot;
}
@@ -47,13 +47,13 @@ vec2 rotate_uv(vec2 uv, vec2 pivot, float rotation) {
void fragment(){
vec2 polar_uv = polar_coordinates(rotate_uv(UV, vec2(0.5), floor(fract(TIME) * animation_speed) ) , vec2(0.5), 0.01, line_count);
vec3 lines = texture(noise, polar_uv).rgb;
float mask_value = length(UV - vec2(0.5));
float mask = inv_lerp(mask_size, mask_edge, mask_value);
float result = 1.0 - (mask * line_density);
result = smoothstep(result, result + line_faloff, lines.r);
COLOR.rgb = vec3(line_color.rgb);
COLOR.a = min(line_color.a, result);
}

View File

@@ -39,7 +39,7 @@ void fragment() {
ROUGHNESS = roughness_tex * roughness;
SPECULAR = specular;
NORMAL_MAP = texture(texture_normal,base_uv).rgb;
NORMAL_MAP_DEPTH = normal_scale;
}