Added a special resource to contain unique instances of BugMarker materials.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// NOTE: Shader automatically converted from Godot Engine 4.2.2.stable's StandardMaterial3D.
|
||||
|
||||
shader_type spatial;
|
||||
render_mode blend_mix,depth_test_disabled,cull_disabled,unshaded;
|
||||
|
||||
uniform vec3 colour : source_color = vec3(1.0f);
|
||||
uniform sampler2D msdf_icon : filter_linear_mipmap,hint_default_black;
|
||||
uniform float shape_thickness : hint_range(0.0f,1.0f,0.01) = 0.95f;
|
||||
uniform vec3 line_colour : source_color = vec3(0.0f);
|
||||
uniform float line_thickness : hint_range(0.0f,1.0f,0.01) = 0.0f;
|
||||
uniform bool billboard = false;
|
||||
|
||||
void vertex() {
|
||||
if (billboard) {
|
||||
MODELVIEW_MATRIX = VIEW_MATRIX * mat4(INV_VIEW_MATRIX[0], INV_VIEW_MATRIX[1], INV_VIEW_MATRIX[2], MODEL_MATRIX[3]);
|
||||
MODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(vec4(length(MODEL_MATRIX[0].xyz), 0.0, 0.0, 0.0), vec4(0.0, length(MODEL_MATRIX[1].xyz), 0.0, 0.0), vec4(0.0, 0.0, length(MODEL_MATRIX[2].xyz), 0.0), vec4(0.0, 0.0, 0.0, 1.0));
|
||||
MODELVIEW_NORMAL_MATRIX = mat3(MODELVIEW_MATRIX);
|
||||
}
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec4 albedo_tex = texture(msdf_icon, UV);
|
||||
if (step(shape_thickness, albedo_tex.r) > 0.5f) { discard; }
|
||||
ALBEDO = (step(shape_thickness-line_thickness, albedo_tex.r) > 0.5f) ? pow(line_colour, vec3(0.4545454545)) : pow(colour.rgb, vec3(0.4545454545));
|
||||
}
|
||||
Reference in New Issue
Block a user