Add lever and jump pad components with activation logic
This commit is contained in:
16
examples/edge_shader/edge_shader.gdshader
Normal file
16
examples/edge_shader/edge_shader.gdshader
Normal file
@@ -0,0 +1,16 @@
|
||||
shader_type canvas_item;
|
||||
/**
|
||||
* This shader fixes normal textures looking wrong when used with SmartShape2D.
|
||||
* See: https://github.com/SirRamEsq/SmartShape2D/blob/master/addons/rmsmartshape/documentation/Normals.md
|
||||
*/
|
||||
|
||||
varying mat2 NORMAL_MATRIX;
|
||||
|
||||
void vertex() {
|
||||
NORMAL_MATRIX = mat2(COLOR.rg, COLOR.ba) * 2.0 - mat2(vec2(1.0), vec2(1.0));
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
NORMAL.xy = NORMAL_MATRIX * NORMAL.xy;
|
||||
COLOR = texture(TEXTURE, UV);
|
||||
}
|
||||
6
examples/edge_shader/material_edge_shader.tres
Normal file
6
examples/edge_shader/material_edge_shader.tres
Normal file
@@ -0,0 +1,6 @@
|
||||
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dpec5hjpflmri"]
|
||||
|
||||
[ext_resource type="Shader" path="res://examples/edge_shader/edge_shader.gdshader" id="1_akl0v"]
|
||||
|
||||
[resource]
|
||||
shader = ExtResource("1_akl0v")
|
||||
Reference in New Issue
Block a user