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 "BlendOp" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
[Enum(UnityEngine.Rendering.BlendOp)] _BlendOp("Blend Operation", Float) = 0.0 | |
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend("Source Blend", Float) = 1.0 | |
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend("Destination Blend", Float) = 1.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
using UnityEngine.Tilemaps; | |
using BlendModes; | |
[ExtendedComponent(typeof(TilemapRenderer))] | |
public class TilemapRendererExtension : RendererExtension<TilemapRenderer> | |
{ | |
public override string[] GetSupportedShaderFamilies () | |
{ | |
return new[] { | |
"SpritesDefault" |
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
#if LIVE2D_AVAILABLE | |
using Live2D.Cubism.Core; | |
using Live2D.Cubism.Framework; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityCommon; | |
using UnityEngine; | |
namespace Naninovel |
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
using Stubble.Core.Builders; | |
using System; | |
class Program | |
{ | |
static string template = | |
@"Lorem ipsum dolor sit amet, consectetur adipiscing elit. | |
{{{ATag}}} | |
{{{ATag}}} | |
{{{ATag}}} |
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
/// <summary> | |
/// Checks whether string is null, empty or consists of whitespace chars. | |
/// </summary> | |
public static bool IsNullEmptyOrWhiteSpace (string content) | |
{ | |
if (String.IsNullOrEmpty(content)) | |
return true; | |
return String.IsNullOrEmpty(content.TrimFull()); | |
} |
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
// Incorporates HSBC effects and gradient overlay blending for sprites. | |
Shader "BlendModes/Extra/SpriteGradientHSBC" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_OverlayTex("Overlay Texture", 2D) = "white" {} | |
_OpacityTex("Opacity Mask", 2D) = "clear" {} |
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
using UnityCommon; | |
/// <summary> | |
/// Represents a set of async actions performed by a <see cref="INovelActor"/> over time. | |
/// </summary> | |
public class NovelActorPerformance : AsyncAction<INovelActor> | |
{ | |
public INovelActor Actor { get { return State; } } | |
private int performancesCount; |
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 "BlendModes/Extra/UIOverlay" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_OverlayTex1("Overlay Texture 1", 2D) = "white" {} | |
_OverlayTex2("Overlay Texture 2", 2D) = "white" {} | |
_OverlayTex3("Overlay Texture 3", 2D) = "white" {} | |
_OverlayTex4("Overlay Texture 4", 2D) = "white" {} | |
_OverlayTex5("Overlay Texture 5", 2D) = "white" {} |
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
// Blend mode and blur effect combined for UI objects. | |
Shader "BlendModes/Extra/UIBlured" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {} | |
_Color("Tint", Color) = (1,1,1,1) | |
_BlurRadius("Blur Radius", Range(1, 20)) = 7 |
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
using UnityEngine; | |
namespace BlendModes | |
{ | |
[RequireComponent(typeof(BlendModeEffect))] | |
public class TintColorUpdater : MonoBehaviour | |
{ | |
private BlendModeEffect blendModeEffect; | |
private void Awake () |