example-grass/Eat Da Rich/Camera/rainbow-quad.tscn

40 lines
1.3 KiB
Plaintext

[gd_scene load_steps=5 format=3 uid="uid://mqsbpvmytw5d"]
[ext_resource type="Texture2D" uid="uid://dxiqtljlpegi" path="res://gradient.png" id="1_rxp6g"]
[sub_resource type="QuadMesh" id="QuadMesh_pajta"]
[sub_resource type="Shader" id="Shader_okmvv"]
code = "// NOTE: Shader automatically converted from Godot Engine 4.4.stable.mono's StandardMaterial3D.
shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_back, unshaded;
#include \"res://addons/rokojori_action_library/Runtime/Shading/Library/Colors.gdshaderinc\"
uniform sampler2D someTex:source_color;
uniform float raw_VS_linear:hint_range(0,1) = 0.0;
void fragment()
{
vec3 rgb = texture( someTex, UV ).rgb;
ALBEDO = mix( rgb, SRGBtoLINEAR( rgb ), raw_VS_linear );
}
"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_okmvv"]
render_priority = 0
shader = SubResource("Shader_okmvv")
shader_parameter/someTex = ExtResource("1_rxp6g")
shader_parameter/raw_VS_linear = 0.0
[node name="Node3D" type="Node3D"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("QuadMesh_pajta")
surface_material_override/0 = SubResource("ShaderMaterial_okmvv")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
mesh = SubResource("QuadMesh_pajta")
surface_material_override/0 = SubResource("ShaderMaterial_okmvv")