diff --git a/Assets/Resources/Brushes/Basic/Bubbles/Bubbles.shader b/Assets/Resources/Brushes/Basic/Bubbles/Bubbles.shader index 99d60c000..195b4bf39 100644 --- a/Assets/Resources/Brushes/Basic/Bubbles/Bubbles.shader +++ b/Assets/Resources/Brushes/Basic/Bubbles/Bubbles.shader @@ -136,7 +136,7 @@ Category { { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; float4 tex = tex2D(_MainTex, i.texcoord); diff --git a/Assets/Resources/Brushes/Basic/DiamondHull/DiamondHull.shader b/Assets/Resources/Brushes/Basic/DiamondHull/DiamondHull.shader index 6064ab37f..d67d448bd 100644 --- a/Assets/Resources/Brushes/Basic/DiamondHull/DiamondHull.shader +++ b/Assets/Resources/Brushes/Basic/DiamondHull/DiamondHull.shader @@ -52,6 +52,7 @@ Shader "Brush/Special/DiamondHull" { uniform half _Opacity; struct Input { + float4 vertex : SV_POSITION; float4 color : Color; float2 tex : TEXCOORD0; float3 viewDir; @@ -182,7 +183,7 @@ Shader "Brush/Special/DiamondHull" { void surf (Input IN, inout SurfaceOutputStandardSpecular o) { if (_ClipEnd > 0 && !(IN.id.x > _ClipStart && IN.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(IN.vertex.xy) >= _Dissolve) discard; // Hardcode some shiny specular values o.Smoothness = .8; diff --git a/Assets/Resources/Brushes/Basic/Plasma/Plasma.shader b/Assets/Resources/Brushes/Basic/Plasma/Plasma.shader index 077b2a77b..c611fa338 100644 --- a/Assets/Resources/Brushes/Basic/Plasma/Plasma.shader +++ b/Assets/Resources/Brushes/Basic/Plasma/Plasma.shader @@ -125,7 +125,7 @@ Category { fixed4 frag (v2f i) : COLOR { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; // Workaround for b/30500118, caused by b/30504121 i.color.a = saturate(i.color.a); diff --git a/Assets/Resources/Brushes/Basic/Snow/Snow.shader b/Assets/Resources/Brushes/Basic/Snow/Snow.shader index 3597ef778..a752ec5e9 100644 --- a/Assets/Resources/Brushes/Basic/Snow/Snow.shader +++ b/Assets/Resources/Brushes/Basic/Snow/Snow.shader @@ -128,7 +128,7 @@ Category { fixed4 frag (v2f i) : SV_Target { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; float4 texCol = tex2D(_MainTex, i.texcoord); float4 color = SrgbToNative(2.0f * i.color * _TintColor * texCol); diff --git a/Assets/Resources/Brushes/Basic/WaveformParticles/WaveformParticles.shader b/Assets/Resources/Brushes/Basic/WaveformParticles/WaveformParticles.shader index de46c8770..85b21b8fc 100644 --- a/Assets/Resources/Brushes/Basic/WaveformParticles/WaveformParticles.shader +++ b/Assets/Resources/Brushes/Basic/WaveformParticles/WaveformParticles.shader @@ -130,7 +130,7 @@ Category { fixed4 frag (v2f i) : SV_Target { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; float4 c = i.color * _TintColor * tex2D(_MainTex, i.texcoord); c = encodeHdr(c.rgb * c.a); diff --git a/Assets/Resources/Brushes/Basic/Wireframe/Wireframe.shader b/Assets/Resources/Brushes/Basic/Wireframe/Wireframe.shader index 4dd9dedf2..981eb3707 100644 --- a/Assets/Resources/Brushes/Basic/Wireframe/Wireframe.shader +++ b/Assets/Resources/Brushes/Basic/Wireframe/Wireframe.shader @@ -83,7 +83,7 @@ Category { fixed4 frag (v2f i) : COLOR { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; half w = 0; #ifdef AUDIO_REACTIVE diff --git a/Assets/Resources/X/Brushes/BubbleWand/BubbleWand.shader b/Assets/Resources/X/Brushes/BubbleWand/BubbleWand.shader index 3898ab768..338e39a0b 100644 --- a/Assets/Resources/X/Brushes/BubbleWand/BubbleWand.shader +++ b/Assets/Resources/X/Brushes/BubbleWand/BubbleWand.shader @@ -36,7 +36,7 @@ Properties { Cull off ZWrite Off CGPROGRAM - #pragma target 3.0 + #pragma target 4.0 #pragma surface surf StandardSpecular vertex:vert #pragma multi_compile __ AUDIO_REACTIVE #pragma multi_compile __ ODS_RENDER ODS_RENDER_CM @@ -77,6 +77,7 @@ Properties { float2 tex : TEXCOORD0; float3 viewDir; uint id : SV_VertexID; + float4 screenPos; INTERNAL_DATA }; @@ -121,7 +122,7 @@ Properties { void surf (Input IN, inout SurfaceOutputStandardSpecular o) { if (_ClipEnd > 0 && !(IN.id.x > _ClipStart && IN.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(IN.screenPos.xy / IN.screenPos.w * _ScreenParams) >= _Dissolve) discard; // Hardcode some shiny specular values o.Smoothness = .9; diff --git a/Assets/Resources/X/Brushes/Digital/Digital.shader b/Assets/Resources/X/Brushes/Digital/Digital.shader index 340880ee3..8ab6e269e 100644 --- a/Assets/Resources/X/Brushes/Digital/Digital.shader +++ b/Assets/Resources/X/Brushes/Digital/Digital.shader @@ -109,7 +109,7 @@ Category { fixed4 frag (v2f i) : COLOR { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; float stroke_width = .1; float antialias_feather_px = 4; diff --git a/Assets/Resources/X/Brushes/Drafting/Drafting.shader b/Assets/Resources/X/Brushes/Drafting/Drafting.shader index 40e7202c3..37be3af96 100644 --- a/Assets/Resources/X/Brushes/Drafting/Drafting.shader +++ b/Assets/Resources/X/Brushes/Drafting/Drafting.shader @@ -90,7 +90,7 @@ Shader "Brush/Special/Drafting" { fixed4 frag (v2f i) : COLOR { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; half4 c = i.color * tex2D(_MainTex, i.texcoord ); c = encodeHdr(c.rgb * c.a * _Opacity); diff --git a/Assets/Resources/X/Brushes/Race/Race.shader b/Assets/Resources/X/Brushes/Race/Race.shader index 426b5d078..49bcb4b15 100644 --- a/Assets/Resources/X/Brushes/Race/Race.shader +++ b/Assets/Resources/X/Brushes/Race/Race.shader @@ -100,7 +100,7 @@ Category { fixed4 frag (v2f i) : COLOR { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; // copied from Digital.shader with a modification on the chance // that a tile will connect with its neighbor diff --git a/Assets/Resources/X/Brushes/Rain/Rain.shader b/Assets/Resources/X/Brushes/Rain/Rain.shader index b85d2ae71..515c80437 100644 --- a/Assets/Resources/X/Brushes/Rain/Rain.shader +++ b/Assets/Resources/X/Brushes/Rain/Rain.shader @@ -125,7 +125,7 @@ Category { fixed4 frag (v2f i) : COLOR { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; float u_scale = _Speed; float t = fmod(GetTime().y * 4 * u_scale, u_scale); diff --git a/Assets/Resources/X/Brushes/RisingBubbles/RisingBubbles.shader b/Assets/Resources/X/Brushes/RisingBubbles/RisingBubbles.shader index 3f742aff6..af297bdae 100644 --- a/Assets/Resources/X/Brushes/RisingBubbles/RisingBubbles.shader +++ b/Assets/Resources/X/Brushes/RisingBubbles/RisingBubbles.shader @@ -155,7 +155,7 @@ Category { fixed4 frag (v2f i) : SV_Target { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; float4 tex = tex2D(_MainTex, i.texcoord); diff --git a/Assets/Resources/X/Brushes/Wind/Wind.shader b/Assets/Resources/X/Brushes/Wind/Wind.shader index e9a1493c5..047c999d0 100644 --- a/Assets/Resources/X/Brushes/Wind/Wind.shader +++ b/Assets/Resources/X/Brushes/Wind/Wind.shader @@ -99,7 +99,7 @@ Category { fixed4 frag (v2f i) : COLOR { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Dissolve < 1 && Dither8x8(i.pos.xy) >= _Dissolve) discard; + if (_Dissolve < 1 && Dither8x8(i.vertex.xy) >= _Dissolve) discard; // Simple scrollin' float time = GetTime().y * _Speed; diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 520c9905a..489b5a465 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -1333,7 +1333,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e1711ff795b0eac4da4815318e17b3fe, type: 3} m_Name: m_EditorClassIdentifier: - m_MaxPointers: 256 + m_MaxPointers: 512 m_MainPointerPrefab: {fileID: 133060, guid: 9b51341e2f5f13c4e8421b42c44de1ef, type: 3} m_AuxPointerPrefab: {fileID: 130268, guid: 7731b9109b4c6e84eaee3f77c6c6c6e1, type: 3} m_DummyPointerPrefab: {fileID: 130268, guid: 98cf8986464c312458b068a83aa98c0a, type: 3} @@ -10175,6 +10175,7 @@ Transform: - {fileID: 8282789105019930893} - {fileID: 621655958} - {fileID: 402490430} + - {fileID: 621655958} - {fileID: 1804317401} m_Father: {fileID: 1796800572} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -10448,6 +10449,12 @@ Transform: m_PrefabInstance: {fileID: 2135251106} m_PrefabAsset: {fileID: 0} --- !u!4 &621655958 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 7492514809118701361, guid: 4cc8817a1d87e2247a553ebb5a78735a, + type: 3} + m_PrefabInstance: {fileID: 7492514809570787495} + m_PrefabAsset: {fileID: 0} +--- !u!4 &621655958 stripped Transform: m_CorrespondingSourceObject: {fileID: 7492514809118701361, guid: 4cc8817a1d87e2247a553ebb5a78735a, type: 3} @@ -31454,6 +31461,9 @@ MonoBehaviour: - m_Type: 9 m_StencilPrefab: {fileID: 114000010150538192, guid: ecebdb0665594e5fa660d0791b73b7f9, type: 3} + - m_Type: 9 + m_StencilPrefab: {fileID: 114000010150538192, guid: ecebdb0665594e5fa660d0791b73b7f9, + type: 3} m_StencilAttractDist: 0.5 m_StencilAttachHysteresis: 0.1 m_StencilLayerName: StencilObject diff --git a/Packages/manifest.json b/Packages/manifest.json index dd81ae76a..aab14dffd 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,8 +1,8 @@ { "dependencies": { "com.ixxy.polyhydra.core": "https://github.com/IxxyXR/polyhydra-core.git#upm", - "com.watertrans.glyphloader": "https://github.com/icosa-mirror/GlyphLoader-Unity.git#upm", "com.ixxy.unitysymmetry": "https://github.com/IxxyXR/unity-symmetry.git?nocache=7#upm", + "com.watertrans.glyphloader": "https://github.com/icosa-mirror/GlyphLoader-Unity.git#upm", "com.meta.xr.sdk.core": "https://github.com/icosa-mirror/com.meta.xr.sdk.core.git#66.0.0-openbrush", "com.meta.xr.sdk.platform": "60.0.0", "com.unity.2d.sprite": "1.0.0",