Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/feature/plugin-scripting' into…
Browse files Browse the repository at this point in the history
… feature/3d-shapes
  • Loading branch information
andybak committed Sep 15, 2024
2 parents 40d30f9 + 3d781c1 commit a6901a9
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Assets/Resources/Brushes/Basic/Bubbles/Bubbles.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Resources/Brushes/Basic/Plasma/Plasma.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Resources/Brushes/Basic/Snow/Snow.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Resources/Brushes/Basic/Wireframe/Wireframe.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions Assets/Resources/X/Brushes/BubbleWand/BubbleWand.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -77,6 +77,7 @@ Properties {
float2 tex : TEXCOORD0;
float3 viewDir;
uint id : SV_VertexID;
float4 screenPos;
INTERNAL_DATA
};

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Resources/X/Brushes/Digital/Digital.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Assets/Resources/X/Brushes/Drafting/Drafting.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Assets/Resources/X/Brushes/Race/Race.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Assets/Resources/X/Brushes/Rain/Rain.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion Assets/Resources/X/Brushes/Wind/Wind.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 11 additions & 1 deletion Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit a6901a9

Please sign in to comment.