LevelUp Shader (3D)

Texture Sampling:

The shader samples three different textures: Aura_Texture, tex_frg_3, and tex_frg_20 using the texture() function. The sampled values are used for further calculations in the shader.

Uniform Parameters:

The shader uses uniform parameters Texture_Scale and Texture_Speed to control the scale and speed of texture sampling.

Time-based Animation:

The shader uses the TIME variable to animate the texture sampling over time, affecting the visual appearance of the shader.

Proximity Fade:

The shader calculates a proximity fade effect based on the depth texture depth_tex_frg_17 to create a fading effect based on the proximity of objects in the scene.

Output:

The final output of the shader sets the ALBEDO color to the input color with the alpha channel modified based on the calculated values in the shader.

Shader code
shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_disabled, diffuse_lambert, specular_schlick_ggx, unshaded, shadows_disabled;

uniform vec2 Texture_Scale = vec2(1.000000, 1.000000);
uniform vec2 Texture_Speed = vec2(0.500000, 3.000000);
uniform sampler2D Aura_Texture : source_color;
uniform sampler2D tex_frg_3 : source_color;
uniform sampler2D tex_frg_20 : source_color;
uniform sampler2D depth_tex_frg_17 : hint_depth_texture;



void fragment() {
// Input:11
	vec4 n_out11p0 = COLOR;
	float n_out11p4 = n_out11p0.a;


// Vector2Parameter:9
	vec2 n_out9p0 = Texture_Scale;


// UVFunc:8
	vec2 n_in8p2 = vec2(0.00000, 0.00000);
	vec2 n_out8p0 = (UV - n_in8p2) * n_out9p0 + n_in8p2;


// Input:5
	float n_out5p0 = TIME;


// Vector2Parameter:7
	vec2 n_out7p0 = Texture_Speed;


// VectorOp:6
	vec2 n_out6p0 = vec2(n_out5p0) * n_out7p0;


// UVFunc:4
	vec2 n_in4p1 = vec2(1.00000, 1.00000);
	vec2 n_out4p0 = n_out6p0 * n_in4p1 + n_out8p0;


	vec4 n_out16p0;
// Texture2D:16
	n_out16p0 = texture(Aura_Texture, n_out4p0);
	float n_out16p1 = n_out16p0.r;


// Texture2D:3
	vec4 n_out3p0 = texture(tex_frg_3, UV);
	float n_out3p1 = n_out3p0.r;


// FloatOp:10
	float n_out10p0 = n_out16p1 * n_out3p1;


// Texture2D:20
	vec4 n_out20p0 = texture(tex_frg_20, UV);
	float n_out20p1 = n_out20p0.r;


// FloatOp:19
	float n_out19p0 = n_out10p0 + n_out20p1;


// FloatOp:12
	float n_out12p0 = n_out11p4 * n_out19p0;


	float n_out17p0;
// ProximityFade:17
	float n_in17p0 = 0.50000;
	{
		float __depth_tex = texture(depth_tex_frg_17, SCREEN_UV).r;
		vec4 __depth_world_pos = INV_PROJECTION_MATRIX * vec4(SCREEN_UV * 2.0 - 1.0, __depth_tex, 1.0);
		__depth_world_pos.xyz /= __depth_world_pos.w;
		n_out17p0 = clamp(1.0 - smoothstep(__depth_world_pos.z + n_in17p0, __depth_world_pos.z, VERTEX.z), 0.0, 1.0);
	}


// FloatOp:18
	float n_out18p0 = n_out12p0 * n_out17p0;


// Output:0
	ALBEDO = vec3(n_out11p0.xyz);
	ALPHA = n_out18p0;


}
Tags
Levelup
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from MilkyDevs

Highlighter Shader (3D)

UI Shader (2D)

Related shaders

Synty Biomes Tree Compatible shader

Stylized Water Shader

Triplanar normal mix shader + detail options

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments