funnymemellama/cardboard_shader.tres
Quantum f2094c8ae7 Button and stuff
Added button
Moved kreb and light into devscene

NOTE:
It looks like godot saves positions mid animation and also saves
the pan location on the shader editor so basically looking at either
of these things then saving the game will cause a change.
Not really important but slightly annoying to see them pop up in git
for no real reason
2023-09-30 13:25:08 -04:00

121 lines
4 KiB
Text

[gd_resource type="VisualShader" load_steps=13 format=3 uid="uid://dwd2vgoqby6rd"]
[ext_resource type="Texture2D" uid="uid://dast4ubkinjb5" path="res://assets/textures/zombietextures_funny/kreb.png" id="1_fcaxl"]
[ext_resource type="Texture2D" uid="uid://dl2how3ds6db" path="res://assets/textures/zombietextures_paper/paper_0025_ao_1k.jpg" id="2_qm08s"]
[ext_resource type="Texture2D" uid="uid://dke8hdaqyfnsn" path="res://assets/textures/zombietextures_paper/paper_0025_normal_opengl_1k.png" id="3_qtx1j"]
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_xrdx0"]
default_input_values = [0, Vector3(0, 0, 0), 1, Vector3(2, 2, 2)]
operator = 2
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_o5oup"]
expanded_output_ports = [0]
texture = ExtResource("1_fcaxl")
texture_type = 1
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_jdjui"]
texture = ExtResource("2_qm08s")
texture_type = 1
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_kox8j"]
output_port_for_preview = 1
expanded_output_ports = [0]
texture = ExtResource("3_qtx1j")
texture_type = 2
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_npjyt"]
operator = 2
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_g351s"]
operator = 2
[sub_resource type="VisualShaderNodeSwitch" id="VisualShaderNodeSwitch_fvm22"]
default_input_values = [0, false, 1, Vector3(1, 1, 1), 2, Vector3(0, 0, 0)]
op_type = 4
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_6nghl"]
input_name = "front_facing"
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_mvcqe"]
operator = 2
[resource]
code = "shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_disabled, diffuse_lambert, specular_schlick_ggx;
uniform sampler2D tex_frg_2 : source_color;
uniform sampler2D tex_frg_4 : hint_normal;
uniform sampler2D tex_frg_3 : source_color;
void fragment() {
// Input:8
bool n_out8p0 = FRONT_FACING;
// Texture2D:2
vec4 n_out2p0 = texture(tex_frg_2, UV);
float n_out2p4 = n_out2p0.a;
// VectorOp:10
vec3 n_in10p1 = vec3(2.00000, 2.00000, 2.00000);
vec3 n_out10p0 = vec3(n_out2p0.xyz) * n_in10p1;
// Texture2D:4
vec4 n_out4p0 = texture(tex_frg_4, UV);
float n_out4p1 = n_out4p0.r;
// VectorOp:9
vec3 n_out9p0 = n_out10p0 * vec3(n_out4p1);
// Texture2D:3
vec4 n_out3p0 = texture(tex_frg_3, UV);
// VectorOp:5
vec3 n_out5p0 = vec3(n_out2p4) * vec3(n_out3p0.xyz);
vec3 n_out7p0;
// Switch:7
n_out7p0 = mix(n_out5p0, n_out9p0, float(n_out8p0));
// VectorOp:6
vec3 n_out6p0 = vec3(n_out2p4) * vec3(n_out4p0.xyz);
// Output:0
ALBEDO = n_out7p0;
ALPHA = n_out2p4;
NORMAL_MAP = n_out6p0;
}
"
modes/cull = 2
nodes/fragment/0/position = Vector2(800, 100)
nodes/fragment/2/node = SubResource("VisualShaderNodeTexture_o5oup")
nodes/fragment/2/position = Vector2(-140, 120)
nodes/fragment/3/node = SubResource("VisualShaderNodeTexture_jdjui")
nodes/fragment/3/position = Vector2(-140, 420)
nodes/fragment/4/node = SubResource("VisualShaderNodeTexture_kox8j")
nodes/fragment/4/position = Vector2(-140, 660)
nodes/fragment/5/node = SubResource("VisualShaderNodeVectorOp_npjyt")
nodes/fragment/5/position = Vector2(240, 440)
nodes/fragment/6/node = SubResource("VisualShaderNodeVectorOp_g351s")
nodes/fragment/6/position = Vector2(240, 600)
nodes/fragment/7/node = SubResource("VisualShaderNodeSwitch_fvm22")
nodes/fragment/7/position = Vector2(540, 240)
nodes/fragment/8/node = SubResource("VisualShaderNodeInput_6nghl")
nodes/fragment/8/position = Vector2(200, 120)
nodes/fragment/9/node = SubResource("VisualShaderNodeVectorOp_mvcqe")
nodes/fragment/9/position = Vector2(480, 460)
nodes/fragment/10/node = SubResource("VisualShaderNodeVectorOp_xrdx0")
nodes/fragment/10/position = Vector2(520, 640)
nodes/fragment/connections = PackedInt32Array(2, 4, 5, 0, 3, 0, 5, 1, 4, 0, 6, 1, 2, 4, 6, 0, 5, 0, 7, 2, 8, 0, 7, 0, 2, 4, 0, 1, 7, 0, 0, 0, 6, 0, 0, 9, 9, 0, 7, 1, 4, 1, 9, 1, 10, 0, 9, 0, 2, 0, 10, 0)