Skip to content

Commit

Permalink
TB 14 brush export
Browse files Browse the repository at this point in the history
Change-Id: Ie1b265260d7615a7f64eed1a39909d23cab4dceb
  • Loading branch information
dubois committed Oct 6, 2017
1 parent c0f7146 commit 9e756fc
Show file tree
Hide file tree
Showing 44 changed files with 947 additions and 33 deletions.
3 changes: 3 additions & 0 deletions UnitySDK/Assets/TiltBrush/Assets/Brushes/AllBrushes.asset
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ MonoBehaviour:
- {fileID: 11400000, guid: 5398e778cce3fdf469bbfa388aa46d5d, type: 2}
- {fileID: 11400000, guid: ebe8a9d99afbd6b46909ea24a9896258, type: 2}
- {fileID: 11400000, guid: 3a72bd3c1fe3d784ab8896ec9fdfd058, type: 2}
- {fileID: 11400000, guid: 71dc5ead67382b75789dd72c8058d553, type: 2}
- {fileID: 11400000, guid: 185ca6407d6d6095e95d6695d994a12b, type: 2}
- {fileID: 11400000, guid: d6f6de76308b4b05386f187491479d94, type: 2}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Category {
float3 displacement_OS = mul(unity_WorldToObject, displacement_WS);
center.xyz += displacement_OS;
float4 corner = OrientParticle(center.xyz, halfSize, v.vid, rotation);
o.vertex = mul(UNITY_MATRIX_MVP, corner);
o.vertex = UnityObjectToClipPos(corner);

// Brighten up the bubbles
o.color = v.color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Category {
{
v.color = TbVertToSrgb(v.color);
v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = v.texcoord;
o.color = bloomColor(v.color, _EmissionGain);
o.unbloomedColor = v.color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'

Shader "Brush/Visualizer/Dots" {
Properties {
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
Expand Down Expand Up @@ -82,7 +80,7 @@ Category {
dispVec.xyz += waveform * _WaveformIntensity.xyz;
corner = corner + dispVec;
#endif
o.vertex = mul(UNITY_MATRIX_MVP, corner);
o.vertex = UnityObjectToClipPos(corner);
o.color = v.color * _BaseGain;
o.texcoord = TRANSFORM_TEX(v.texcoord.xy,_MainTex);
o.waveform = waveform * 15;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Category {
float envelope = sin(v.texcoord0.x * 3.14159);
float widthMultiplier = 1 - envelope;
v.vertex.xyz += -v.texcoord1 * widthMultiplier;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.color = TbVertToNative(v.color);
o.texcoord = v.texcoord0;
UNITY_TRANSFER_FOG(o, o.vertex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ CGINCLUDE
// This adds curl noise
v.vertex.xyz += disp * _DisplacementIntensity * envelopePow;

o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.color = bloomColor(v.color, _EmissionGain);
o.texcoord = v.texcoord0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Category {
// Note that we assume object space == canvas space (which it is, for TB)
center = center + float4(disp.xyz, 0);
float4 corner = OrientParticle(center.xyz, halfSize, v.vid, rotation);
o.vertex = mul(UNITY_MATRIX_MVP, corner);
o.vertex = UnityObjectToClipPos(corner);
#endif

o.color = v.color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'

Shader "Brush/Special/Fire" {
Properties {
_MainTex ("Particle Texture", 2D) = "white" {}
Expand Down Expand Up @@ -73,7 +71,7 @@ Category {
v2f o;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
o.color = bloomColor(v.color, _EmissionGain);
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.worldPos = mul(unity_ObjectToWorld, v.vertex);
return o;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Category {
{

v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
o.color = TbVertToNative(v.color);
return o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'

Shader "Brush/Special/HyperGrid" {
Properties {
_TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'

Shader "Brush/Special/Plasma" {
Properties {
_MainTex ("Particle Texture", 2D) = "white" {}
Expand Down Expand Up @@ -80,7 +78,7 @@ Category {

v2f o;
o.worldPos = mul(unity_ObjectToWorld, v.vertex);
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Category {
v.color = TbVertToSrgb(v.color);

v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
o.color = v.color;
return o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Category {
#else
o.color = TbVertToNative(v.color);
#endif
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);

return o;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Category {
o.texcoord = TRANSFORM_TEX(v.texcoord.xy,_MainTex);

float4 corner = OrientParticle(center.xyz, halfSize, v.vid, rotation);
o.vertex = mul(UNITY_MATRIX_MVP, corner);
o.vertex = UnityObjectToClipPos(corner);

return o;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'

Shader "Brush/Special/Streamers" {
Properties {
_MainTex ("Particle Texture", 2D) = "white" {}
Expand Down Expand Up @@ -73,7 +71,7 @@ Category {

v2f o;
o.worldPos = mul(unity_ObjectToWorld, v.vertex);
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
o.color = v.color;
return o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ CGINCLUDE

// Technically these are not yet in NDC because they haven't been divided by W, so their
// range is currently [-W, W].
o.vertex = mul(UNITY_MATRIX_MVP, float4(v.vertex.xyz + v.normal.xyz * bulge, v.vertex.w));
float4 outline_NDC = mul(UNITY_MATRIX_MVP,
float4(v.vertex.xyz + v.normal.xyz * inflate, v.vertex.w));
o.vertex = UnityObjectToClipPos(float4(v.vertex.xyz + v.normal.xyz * bulge, v.vertex.w));
float4 outline_NDC = UnityObjectToClipPos(float4(v.vertex.xyz + v.normal.xyz * inflate, v.vertex.w));

// Displacement in proper NDC coords (e.g. [-1, 1])
float3 disp = outline_NDC.xyz / outline_NDC.w - o.vertex.xyz / o.vertex.w;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Category {
#else
o.color = TbVertToNative(v.color);
#endif
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);

return o;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Category {
v.color = TbVertToSrgb(v.color);

v2f o;
o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
o.vertex = UnityObjectToClipPos(v.vertex);
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
o.color = bloomColor(v.color, _EmissionGain);
o.unbloomedColor = v.color;
Expand Down
9 changes: 9 additions & 0 deletions UnitySDK/Assets/TiltBrush/Assets/Brushes/Blocks.meta

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,25 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 103cd3480fe93f646be28a7da5812871, type: 3}
m_Name: BlocksGem
m_EditorClassIdentifier:
m_Guid:
m_storage: 232998f8-d357-47a2-993a-53415df9be10
m_DurableName: BlocksGem
m_Material: {fileID: 2100000, guid: 232998f8d35747a2993a53415df9be10, type: 2}
m_IsParticle: 0
m_uv0Size: 0
m_uv0Semantic: 0
m_uv1Size: 0
m_uv1Semantic: 0
m_bUseNormals: 1
m_normalSemantic: 0
m_bFbxExportNormalAsTexcoord1: 0

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9e756fc

Please sign in to comment.