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 | |
| @export var display_material:Material | |
| @export var game_state:PackedByteArray | |
| const width:int = 64 | |
| const height:int = 64 | |
| var rd := RenderingServer.create_local_rendering_device() |
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 unshaded; | |
| uniform uint tilemap[1024]; // up to 128 8-byte 8x8 tiles | |
| uniform uint screen[1000];// 40 x 25 screen map, 7 bits index one of the 128 tiles, highest bit inverts | |
| uniform uint screenWidth = 40; | |
| uniform uint screenHeight = 25; |
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
| @tool | |
| extends EditorScript | |
| class_name BitmapToArray | |
| # this is using a tile map available here: | |
| # https://hexany-ives.itch.io/hexanys-roguelike-tiles | |
| const sourceImage:String = "res://arraydemo/monochrome_16x16.png" #image we get tiles from | |
| const width:int = 32 # how many tiles wide is the source image | |
| const height:int = 32 # how many tiles tall is the source image |
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 particles; | |
| void start() { | |
| if (RESTART_POSITION) { | |
| TRANSFORM[3].xyz = EMISSION_TRANSFORM[3].xyz; //sets to emitter position | |
| float _time = TIME * 200.0; | |
| VELOCITY = vec3(1.*cos(_time),0.,1.*sin(_time)); //sets angle based on time | |
| } | |
| } |
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_opaque, cull_back, diffuse_lambert, specular_schlick_ggx; | |
| uniform sampler2D Tile_Texture:source_color, filter_linear_mipmap, repeat_enable; | |
| //used for random values on tile | |
| vec2 random(float x, float y) { | |
| vec2 co = round(vec2(x,y)); | |
| return 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 "Unlit/ScreenSpaceGradient" | |
| { | |
| Properties | |
| { | |
| _TopColour("Top Colour", Color) = (0.5,0.5,0.5,1) | |
| _BottomColour("Bottom Colour", Color) = (0.5,0.5,0.5,1) | |
| _Height("Height", float) = 0.0 | |
| } | |
| SubShader | |
| { |
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 "Unlit/TwoPassStencilShader" | |
| { | |
| Properties | |
| { | |
| _Color1("Colour1", Color) = (1,0,0,1) | |
| _Color2("Colour2", Color) = (0,0,1,1) | |
| } | |
| SubShader | |
| { | |
| Tags{ |
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 "Unlit/CircleBlur" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| _Radius ("Radius", float) = 0.8 | |
| } | |
| SubShader | |
| { |
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 "Unlit/GatheringEnergy" | |
| { | |
| Properties | |
| { | |
| _LineWidth("Line Width", float) = 1.5 | |
| _LineLength("Line length", float) = 10.0 | |
| _LengthMult("Length Multiplier", float) = 0.2 | |
| _InwardSpeed("Inward Speed", float) = 4.0 | |
| _Seed("Random Seed", float) = 0.0 | |
| _Slices("Radial Slices", int) = 9 |
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 "Skybox/MoonSkybox" | |
| { | |
| //Displays a skybox with an overlayed texture that can be positioned as a moon | |
| Properties | |
| { | |
| _MoonTex ("Moon Texture", 2D) = "white" {} | |
| _SkyMap ("Sky Map", Cube) = "" {} | |
| _MoonDirection ("Moon Direction", Vector) = (0.4, 0.8, 0, 0) | |
| _MoonScale ("Moon Scale", Range(0.01, 1.0)) = 0.2 | |
| } |