This file contains 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
// VERSION 0.3.1. Please get the latest version from: | |
// https://gist.github.com/lyuma/744e7fe35f7758add2f4468bb12f87f1 | |
// Lyuma's Rounded Trail with Shading | |
// Based on phi16's rounded trail | |
// Based on Xiexe's Unity Lit Shader Templates: | |
// https://github.com/Xiexe/Unity-Lit-Shader-Templates | |
// Installation Notes: | |
// YOU MUST COPY ALL OF THE .cginc FILES FROM |
This file contains 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_burley,specular_schlick_ggx; | |
uniform vec4 albedo : hint_color; | |
uniform sampler2D texture_albedo : hint_albedo; | |
uniform float specular; | |
uniform float metallic; | |
uniform float roughness : hint_range(0,1); | |
uniform float point_size : hint_range(0,128); | |
uniform vec3 uv1_scale; | |
uniform vec3 uv1_offset; |
This file contains 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_burley,specular_schlick_ggx; | |
uniform vec4 albedo : hint_color; | |
uniform sampler2D texture_albedo : hint_albedo; | |
uniform vec3 uv1_scale; | |
uniform vec3 uv1_offset; | |
uniform float specular; | |
uniform float metallic; | |
uniform float roughness : hint_range(0,1); |
This file contains 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
// Global temporary variables in GLSL, and access to ambient/reflection/SH9 in shaders: | |
// Requires these patches: | |
// https://github.com/lyuma/godot/tree/shader_improvements_meta (master) | |
// https://github.com/lyuma/godot/tree/shader_global_arrays_3.2 (3.2) | |
// https://github.com/lyuma/godot/tree/shader_npr_lighting_3.2 (3.2) | |
vec4 unity_SHAr = vec4(0.0); | |
vec4 unity_SHAg = vec4(0.0); | |
vec4 unity_SHAb = vec4(0.0); | |
vec4 unity_SHBr = vec4(0.0); |
This file contains 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 usampler2D data_tex; | |
/* | |
Use with the following GDScript code: | |
var data_img = Image.new() | |
var data := PoolByteArray() | |
var indexin = 0x8400 |
This file contains 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
#!/bin/bash | |
# Thanks to: | |
# https://dille.name/blog/2018/09/20/how-to-tag-docker-images-without-pulling-them/ | |
# https://hub.docker.com/support/doc/how-do-i-authenticate-with-the-v2-api | |
# https://gist.github.com/alexanderilyin/8cf68f85b922a7f1757ae3a74640d48a | |
# for all the help. | |
# TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'"$(cat ~/.docker/config.json | cut -d\" -f8)"'", "password": "'"$(cat ~/.docker/config.json | cut -d\" -f12)"'"}' https://hub.docker.com/v2/users/login/ | cut -d\" -f4) | |
# "Authorization: JWT $TOKEN" |
This file contains 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
/* Copyright (c) 2020 Lyuma <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
This file contains 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
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) | |
// Edited by Lyuma - Added second and third third skybox if light is at sunset, or below the horizon respectively. | |
Shader "Skybox/CubemapTrio" | |
{ | |
Properties | |
{ | |
_Rotation ("Rotation", Range(0, 360)) = 0 | |
[NoScaleOffset] _Tex ("Cubemap Day", Cube) = "grey" {} | |
[NoScaleOffset] _TexSunset ("Cubemap Sunset", Cube) = "grey" {} | |
[NoScaleOffset] _TexNight ("Cubemap Night", Cube) = "grey" {} |
This file contains 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
// Pixelated font shader by lox9973 | |
// It is a cutout shader, using alpha blending for 1 pixel antialiasing on the edges. | |
// Intended use is "3D Text" on an opaque object like a sign. | |
Shader "UI/PixelFont" { | |
Properties { | |
_MainTex ("Font Texture", 2D) = "white" {} | |
_Color ("Text Color", Color) = (1,1,1,1) | |
} | |
SubShader { | |
// Below Transparent queue. Renders after the skybox, but writes to depth. |
This file contains 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
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) | |
// Edited by Lyuma - Added second skybox if light is below the horizon. | |
Shader "Skybox/CubemapDual" | |
{ | |
Properties | |
{ | |
_Rotation ("Rotation", Range(0, 360)) = 0 | |
[NoScaleOffset] _Tex ("Cubemap Day", Cube) = "grey" {} | |
[NoScaleOffset] _TexNight ("Cubemap Night", Cube) = "grey" {} | |
_NightDotThreshold ("Night Dot Threshold", Range(-1, 1)) = 0 |