A dungeon delver roguelike using Pathfinder 2nd edition rules
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added old toon shader, need to apply it to each individual object in the scene (yay -_-)

+69
+9
shader/color-gradient.tres
··· 1 + [gd_resource type="GradientTexture1D" load_steps=2 format=3 uid="uid://8dsy7p7mnlae"] 2 + 3 + [sub_resource type="Gradient" id="Gradient_csrxj"] 4 + interpolation_mode = 1 5 + offsets = PackedFloat32Array(0, 0.444, 0.51) 6 + colors = PackedColorArray(0, 0, 0, 1, 0.469, 0.469, 0.469, 1, 1, 1, 1, 1) 7 + 8 + [resource] 9 + gradient = SubResource("Gradient_csrxj")
+7
shader/fresnel-gradient.tres
··· 1 + [gd_resource type="GradientTexture1D" load_steps=2 format=3 uid="uid://cqtqj3c3voq11"] 2 + 3 + [sub_resource type="Gradient" id="Gradient_iv2j0"] 4 + offsets = PackedFloat32Array(0.539, 0.777) 5 + 6 + [resource] 7 + gradient = SubResource("Gradient_iv2j0")
+52
shader/toon.gdshader
··· 1 + shader_type spatial; 2 + render_mode blend_mix,depth_draw_opaque,cull_disabled,diffuse_toon,specular_toon; 3 + uniform vec4 albedo : source_color; 4 + uniform sampler2D texture_albedo : source_color,filter_linear_mipmap,repeat_enable; 5 + uniform float point_size : hint_range(0,128); 6 + uniform float roughness : hint_range(0,1); 7 + uniform sampler2D texture_metallic : hint_default_white,filter_linear_mipmap,repeat_enable; 8 + uniform vec4 metallic_texture_channel; 9 + uniform sampler2D texture_roughness : hint_roughness_g,filter_linear_mipmap,repeat_enable; 10 + uniform float specular; 11 + uniform float metallic; 12 + uniform sampler2D texture_normal : hint_roughness_normal,filter_linear_mipmap,repeat_enable; 13 + uniform float normal_scale : hint_range(-16,16); 14 + uniform vec3 uv1_scale; 15 + uniform vec3 uv1_offset; 16 + uniform vec3 uv2_scale; 17 + uniform vec3 uv2_offset; 18 + 19 + uniform sampler2D color_gradient; 20 + uniform sampler2D color_ramp3; 21 + 22 + float fresnel(float amount, vec3 normal, vec3 view) 23 + { 24 + return pow((1.0 - clamp(dot(normalize(normal), normalize(view)), 0.0, 1.0 )), amount); 25 + } 26 + 27 + void vertex() { 28 + UV=UV*uv1_scale.xy+uv1_offset.xy; 29 + } 30 + 31 + void fragment() { 32 + float basic_fresnel = fresnel(4.0, NORMAL, VIEW); 33 + 34 + vec2 base_uv = UV; 35 + vec4 albedo_tex = texture(texture_albedo,base_uv); 36 + ALBEDO = albedo.rgb * albedo_tex.rgb + (basic_fresnel * texture(color_ramp3, vec2(basic_fresnel, 0.0)).rgb * 1.0); 37 + float metallic_tex = dot(texture(texture_metallic,base_uv),metallic_texture_channel); 38 + METALLIC = metallic_tex * metallic; 39 + vec4 roughness_texture_channel = vec4(0.0,1.0,0.0,0.0); 40 + float roughness_tex = dot(texture(texture_roughness,base_uv),roughness_texture_channel); 41 + ROUGHNESS = roughness_tex * roughness; 42 + SPECULAR = 0.0; 43 + NORMAL_MAP = texture(texture_normal,base_uv).rgb; 44 + NORMAL_MAP_DEPTH = normal_scale; 45 + } 46 + 47 + void light() { 48 + float dotproduct = clamp(dot(NORMAL, LIGHT), -0.9, 0.9); 49 + float sample = clamp((dotproduct + 1.0) * ATTENUATION / 2.1, 0.05, 0.95); 50 + vec4 shaded = texture(color_gradient, vec2(sample, 0.0)); 51 + DIFFUSE_LIGHT += (shaded.rgb * LIGHT_COLOR) / 2.0; 52 + }
+1
shader/toon.gdshader.uid
··· 1 + uid://bctprfe3lxb5q