Hey everyone! 🌟
A bit of background: I initially began developing a Life Sim Survival game in Unity and had about 30-40% of it done. However, after the recent Unity fee changes, I decided to take the plunge and switch over. Now, I've started from scratch in Godot, focusing on a simpler game to really get the hang of it.
I'm thrilled to showcase my first substantial functionality in Godot 4.1 using C#: the character customization! It leverages blend shapes, and for the hair shader, I've implemented the Marschner Hair model for that extra touch of realism.
I'd be super grateful for any feedback, and if you'd like to see more of my journey and progress, do consider following me on Twitter: https://twitter.com/MehowLipa
I've created custom shader for roads and lines.
Basically lines are using road Normal and Roughness to fit to road structure. Also updated textures to 4k.
Hey everyone! 🌟
A bit of background: I initially began developing a Life Sim Survival game in Unity and had about 30-40% of it done. However, after the recent Unity fee changes, I decided to take the plunge and switch over. Now, I've started from scratch in Godot, focusing on a simpler game to really get the hang of it.
I'm thrilled to showcase my first substantial functionality in Godot 4.1 using C#: the character customization! It leverages blend shapes, and for the hair shader, I've implemented the Marschner Hair model for that extra touch of realism.
I'd be super grateful for any feedback, and if you'd like to see more of my journey and progress, do consider following me on Twitter: https://twitter.com/MehowLipa
Thanks for your support!
Nope, you will need two hands to play this game
thank, for the feedback - I'll do simple highlight as you suggested
Sure, there you go:
From editor view add textures for road and lines. I'm downloaded from https://ambientcg.com or https://cc0-textures.com
I've added also there an option to scale Lines UV to fit road width.
Code:
shader_type spatial;// Road texturesuniform sampler2D road_color_texture;uniform sampler2D road_normal_texture;uniform sampler2D road_roughness_texture;uniform sampler2D road_displacement_texture; // Displacement texture for road and lines// Road line texturesuniform sampler2D line_color_texture;uniform sampler2D line_opacity_texture; // Controls where the road lines appear// Road lines parametersuniform float line_intensity : hint_range(0, 1) = 1.0; // Adjust the intensity of the road linesuniform vec2 line_uv_scale = vec2(1.0, 1.0); // UV scale for road linesvoid fragment() {// Sample the road texturesvec3 road_color = texture(road_color_texture, UV).rgb;vec3 road_normal = (texture(road_normal_texture, UV).rgb - 0.5) * 2.0;float road_roughness = texture(road_roughness_texture, UV).r;// Adjusted UVs for road linesvec2 line_uv = UV * line_uv_scale;// Sample the road line texturesvec3 line_color = texture(line_color_texture, line_uv).rgb;float line_opacity = texture(line_opacity_texture, line_uv).r;// Blend road lines over the road surfacevec3 final_color = mix(road_color, line_color, line_opacity * line_intensity);// OutputALBEDO = final_color;NORMAL_MAP = road_normal;ROUGHNESS = road_roughness;}