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
// By default Godot does not include a local y space billboard option within the StandardMaterial3D, and only includes a world up. | |
// This is annoying, as for a lot of effects you need the billboard to align with an axis that isn't world up. | |
// For example bullet tracers, or muzzle flashes shown from the side, or grass aligned with a slopes normal. | |
// This shader adds this feature. | |
// To use it, simply add this as the shader on a quad's material. | |
shader_type spatial; | |
render_mode blend_mix,depth_draw_opaque,cull_back,unshaded; | |
uniform vec4 albedo : source_color; | |
uniform sampler2D texture_albedo : source_color,filter_linear_mipmap,repeat_enable; |
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
using UnityEngine; | |
/// <summary> | |
/// Provides means to deep-copy a TerrainData object because Unitys' built-in "Instantiate" method | |
/// will miss some things and the resulting copy still shares data with the original. | |
/// </summary> | |
public class TerrainDataCloner { | |
/// <summary> | |
/// Creates a real deep-copy of a TerrainData | |
/// </summary> |