LargeScreen/main_perspective.gd

15 lines
487 B
GDScript3
Raw Permalink Normal View History

2025-01-02 02:25:42 +08:00
extends TextureRect
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
texture = Global.EgoVehicle3D.MainSubGetTexture()
pass # Replace with function body.
func _physics_process(delta: float) -> void:
Global.EgoVehicle3D.main_sub_viewport.size = size
2025-01-03 14:02:17 +08:00
var minSize = Vector2(1,size.y/size.x)
material.set_shader_parameter("size",minSize)
var Magnification = minSize.y / minSize.x
material.set_shader_parameter("round_all",0.05*Magnification)