immersive-home/app/test/content/grid_shader.gd
2024-05-23 00:36:49 +02:00

9 lines
248 B
GDScript

@tool
extends Node3D
const GridShader = preload ("res://assets/materials/grid.tres")
@onready var mesh = $MeshInstance3D
func _process(_delta):
GridShader.set_shader_parameter("dot_offset", TransformTools.plane_2d_coords(mesh.global_transform))