This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Node | |
# based on https://github.com/pkdawson/rd_demo/blob/master/demo.gd | |
# CC0-1.0 license | |
#path to TextureRect node for visualisations | |
@onready var texture_rect = $"../VBoxContainer/TextureRect" | |
var vertSrc = "#version 450 | |
vec2 positions[3] = vec2[]( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader_type spatial; | |
render_mode cull_back,blend_mix, diffuse_burley, specular_schlick_ggx; | |
// This is the reference shader of the plugin, and has the most features. | |
// it should be preferred for high-end graphics cards. | |
// For less features but lower-end targets, see the lite version. | |
uniform sampler2D u_terrain_heightmap; | |
uniform sampler2D u_terrain_normalmap; | |
// I had to remove `hint_albedo` from colormap because it makes sRGB conversion kick in, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader_type spatial; | |
render_mode cull_disabled, blend_mix,diffuse_burley, specular_schlick_ggx; | |
uniform sampler2D u_terrain_heightmap; | |
uniform sampler2D u_terrain_detailmap; | |
uniform sampler2D u_terrain_normalmap; | |
uniform sampler2D u_terrain_globalmap : hint_albedo; | |
uniform mat4 u_terrain_inverse_transform; | |
uniform mat3 u_terrain_normal_basis; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader_type spatial; | |
render_mode blend_mix,depth_draw_always, cull_disabled,diffuse_burley,specular_schlick_ggx; | |
uniform vec4 albedo : hint_color; | |
uniform sampler2D texture_albedo : hint_albedo; | |
uniform float specular = 0.5; | |
uniform float metallic = 0; | |
uniform float proximity_fade_distance = 0.85; | |
uniform float roughness : hint_range(0,1) = 1; | |
uniform float alpha_clip : hint_range(0,1) = 0.85; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUBSYSTEM=="input", ATTRS{name}=="Matrix GPIO keyboard", ENV{ID_INPUT_JOYSTICK}="1" |