-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 62c952240969ade458964f3bd738407a, type: 3} | ||
m_Name: Multichannel Paint Brush Object | ||
m_EditorClassIdentifier: | ||
<PaintBrushes>k__BackingField: | ||
- rid: 4411147410609274888 | ||
- rid: 4411147410609274890 | ||
references: | ||
version: 2 | ||
RefIds: | ||
- rid: 4411147410609274888 | ||
type: {class: TexturedPaintBrushData, ns: PaintSystem, asm: PaintSystem} | ||
data: | ||
<PaintBrushData>k__BackingField: | ||
rid: 4411147410609274889 | ||
<PaintTexture>k__BackingField: {fileID: 2800000, guid: db80ee5d352c3014c85fca9f808d539c, | ||
type: 3} | ||
<PaintTextureRotation>k__BackingField: {x: 0, y: 0, z: 0} | ||
<PaintTextureScale>k__BackingField: {x: 0.16666667, y: 0.16666667} | ||
<PaintTextureOffset>k__BackingField: {x: 0.5, y: 0.5} | ||
- rid: 4411147410609274889 | ||
type: {class: PaintBrushData, ns: PaintSystem, asm: PaintSystem} | ||
data: | ||
<BrushRadius>k__BackingField: 1 | ||
<BrushHardness>k__BackingField: 0 | ||
<BrushStrength>k__BackingField: 0.5 | ||
<PaintColor>k__BackingField: {r: 0.34582543, g: 0.16945527, b: 0.8018868, | ||
a: 1} | ||
- rid: 4411147410609274890 | ||
type: {class: TexturedPaintBrushData, ns: PaintSystem, asm: PaintSystem} | ||
data: | ||
<PaintBrushData>k__BackingField: | ||
rid: 4411147410609274891 | ||
<PaintTexture>k__BackingField: {fileID: 2800000, guid: db80ee5d352c3014c85fca9f808d539c, | ||
type: 3} | ||
<PaintTextureRotation>k__BackingField: {x: 0, y: 0, z: 0} | ||
<PaintTextureScale>k__BackingField: {x: 0.16666666, y: 0.16666666} | ||
<PaintTextureOffset>k__BackingField: {x: 0.5, y: 0.5} | ||
- rid: 4411147410609274891 | ||
type: {class: PBRPaintBrushData, ns: PaintSystem, asm: PaintSystem} | ||
data: | ||
<PaintBrushData>k__BackingField: | ||
<BrushRadius>k__BackingField: 1 | ||
<BrushHardness>k__BackingField: 0 | ||
<BrushStrength>k__BackingField: 0.5 | ||
<PaintColor>k__BackingField: {r: 1, g: 1, b: 1, a: 1} | ||
<PaintMetallic>k__BackingField: 0.5 | ||
<PaintSmoothness>k__BackingField: 0.75 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using UnityEngine; | ||
|
||
namespace PaintSystem | ||
{ | ||
public interface IPaintBrush | ||
{ | ||
float BrushRadius { get; } | ||
float BrushHardness { get; } | ||
float BrushStrength { get; } | ||
Color PaintColor { get; } | ||
PaintTarget PaintTarget { get; } | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using UnityEngine; | ||
|
||
namespace PaintSystem | ||
{ | ||
public interface ITexturedPaintBrush : IPaintBrush | ||
{ | ||
Texture2D PaintTexture { get; } | ||
Vector3 PaintTextureRotation { get; } | ||
Vector2 PaintTextureScale { get; } | ||
Vector2 PaintTextureOffset { get; } | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using UnityEngine; | ||
|
||
namespace PaintSystem | ||
{ | ||
[Serializable] | ||
public struct PBRPaintBrushData : IPaintBrush | ||
{ | ||
public PBRPaintBrushData(PaintBrushData paintBrushData) : this() | ||
{ | ||
PaintBrushData = paintBrushData; | ||
} | ||
|
||
public static readonly PBRPaintBrushData Default = new PBRPaintBrushData() | ||
{ | ||
PaintBrushData = PaintBrushData.Default, | ||
PaintMetallic = 0.5f, | ||
PaintSmoothness = 0.5f | ||
}; | ||
|
||
[field: SerializeField] public PaintBrushData PaintBrushData { get; set; } | ||
[field: SerializeField][field: Range(0f, 1f)] public float PaintMetallic { get; set; } | ||
[field: SerializeField][field: Range(0f, 1f)] public float PaintSmoothness { get; set; } | ||
|
||
public readonly float BrushRadius => PaintBrushData.BrushRadius; | ||
public readonly float BrushHardness => PaintBrushData.BrushHardness; | ||
public readonly float BrushStrength => PaintBrushData.BrushStrength; | ||
|
||
public readonly Color PaintColor => new Color(PaintMetallic, PaintSmoothness, 0.0f, 1.0f); | ||
|
||
public readonly PaintTarget PaintTarget => PaintTarget.MetallicSmoothness; | ||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using UnityEngine; | ||
|
||
namespace PaintSystem | ||
{ | ||
[Serializable] | ||
public struct PaintBrushData : IPaintBrush | ||
{ | ||
public static readonly PaintBrushData Default = new PaintBrushData() | ||
{ | ||
BrushRadius = 1f, | ||
BrushHardness = 0.5f, | ||
BrushStrength = 0.5f, | ||
PaintColor = Color.white | ||
}; | ||
|
||
[field: SerializeField][field: Min(0)] public float BrushRadius { get; set; } | ||
[field: SerializeField][field: Range(0f, 1f)] public float BrushHardness { get; set; } | ||
[field: SerializeField][field: Range(0f, 1f)] public float BrushStrength { get; set; } | ||
[field: SerializeField] public Color PaintColor { get; set; } | ||
|
||
public readonly PaintTarget PaintTarget => PaintTarget.Albedo; | ||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace PaintSystem | ||
{ | ||
public enum PaintTarget | ||
{ | ||
Albedo, | ||
MetallicSmoothness, | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.