Skip to content

Commit 92b9ad4

Browse files
committed
Ray Marching 3D & Images
- soft shadows & better lighting for Ray Marching 3D - descriptions and introduction in main menu - more images
1 parent b7c542b commit 92b9ad4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+751
-504
lines changed

Fractals Project/Assets/Scenes/RayMarching3D.unity

+213-2
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,216 @@ CanvasRenderer:
487487
m_PrefabAsset: {fileID: 0}
488488
m_GameObject: {fileID: 907002857}
489489
m_CullTransparentMesh: 0
490+
--- !u!1001 &908585213
491+
PrefabInstance:
492+
m_ObjectHideFlags: 0
493+
serializedVersion: 2
494+
m_Modification:
495+
m_TransformParent: {fileID: 1149578827}
496+
m_Modifications:
497+
- target: {fileID: 1452083679841220395, guid: 1f834fe602c595649a57bd478ffa5942,
498+
type: 3}
499+
propertyPath: m_textInfo.characterCount
500+
value: 0
501+
objectReference: {fileID: 0}
502+
- target: {fileID: 1452083679841220395, guid: 1f834fe602c595649a57bd478ffa5942,
503+
type: 3}
504+
propertyPath: m_textInfo.wordCount
505+
value: 0
506+
objectReference: {fileID: 0}
507+
- target: {fileID: 1452083679841220395, guid: 1f834fe602c595649a57bd478ffa5942,
508+
type: 3}
509+
propertyPath: m_textInfo.lineCount
510+
value: 0
511+
objectReference: {fileID: 0}
512+
- target: {fileID: 1452083679841220395, guid: 1f834fe602c595649a57bd478ffa5942,
513+
type: 3}
514+
propertyPath: m_textInfo.pageCount
515+
value: 0
516+
objectReference: {fileID: 0}
517+
- target: {fileID: 2886464298844970360, guid: 1f834fe602c595649a57bd478ffa5942,
518+
type: 3}
519+
propertyPath: app
520+
value:
521+
objectReference: {fileID: 1663493760}
522+
- target: {fileID: 2886464298844970360, guid: 1f834fe602c595649a57bd478ffa5942,
523+
type: 3}
524+
propertyPath: optionName
525+
value: O_Shadows
526+
objectReference: {fileID: 0}
527+
- target: {fileID: 2886464298844970360, guid: 1f834fe602c595649a57bd478ffa5942,
528+
type: 3}
529+
propertyPath: min
530+
value: 1
531+
objectReference: {fileID: 0}
532+
- target: {fileID: 2886464298844970360, guid: 1f834fe602c595649a57bd478ffa5942,
533+
type: 3}
534+
propertyPath: max
535+
value: 256
536+
objectReference: {fileID: 0}
537+
- target: {fileID: 3020254205512028578, guid: 1f834fe602c595649a57bd478ffa5942,
538+
type: 3}
539+
propertyPath: m_textInfo.characterCount
540+
value: 0
541+
objectReference: {fileID: 0}
542+
- target: {fileID: 3020254205512028578, guid: 1f834fe602c595649a57bd478ffa5942,
543+
type: 3}
544+
propertyPath: m_textInfo.wordCount
545+
value: 0
546+
objectReference: {fileID: 0}
547+
- target: {fileID: 3020254205512028578, guid: 1f834fe602c595649a57bd478ffa5942,
548+
type: 3}
549+
propertyPath: m_textInfo.lineCount
550+
value: 0
551+
objectReference: {fileID: 0}
552+
- target: {fileID: 3020254205512028578, guid: 1f834fe602c595649a57bd478ffa5942,
553+
type: 3}
554+
propertyPath: m_textInfo.pageCount
555+
value: 0
556+
objectReference: {fileID: 0}
557+
- target: {fileID: 4412081283395472661, guid: 1f834fe602c595649a57bd478ffa5942,
558+
type: 3}
559+
propertyPath: m_textInfo.characterCount
560+
value: 0
561+
objectReference: {fileID: 0}
562+
- target: {fileID: 4412081283395472661, guid: 1f834fe602c595649a57bd478ffa5942,
563+
type: 3}
564+
propertyPath: m_textInfo.wordCount
565+
value: 0
566+
objectReference: {fileID: 0}
567+
- target: {fileID: 4412081283395472661, guid: 1f834fe602c595649a57bd478ffa5942,
568+
type: 3}
569+
propertyPath: m_textInfo.lineCount
570+
value: 0
571+
objectReference: {fileID: 0}
572+
- target: {fileID: 4412081283395472661, guid: 1f834fe602c595649a57bd478ffa5942,
573+
type: 3}
574+
propertyPath: m_textInfo.pageCount
575+
value: 0
576+
objectReference: {fileID: 0}
577+
- target: {fileID: 4412081283409038069, guid: 1f834fe602c595649a57bd478ffa5942,
578+
type: 3}
579+
propertyPath: m_AnchorMax.y
580+
value: 1
581+
objectReference: {fileID: 0}
582+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
583+
type: 3}
584+
propertyPath: m_LocalPosition.x
585+
value: 0
586+
objectReference: {fileID: 0}
587+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
588+
type: 3}
589+
propertyPath: m_LocalPosition.y
590+
value: 0
591+
objectReference: {fileID: 0}
592+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
593+
type: 3}
594+
propertyPath: m_LocalPosition.z
595+
value: 0
596+
objectReference: {fileID: 0}
597+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
598+
type: 3}
599+
propertyPath: m_LocalRotation.x
600+
value: -0
601+
objectReference: {fileID: 0}
602+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
603+
type: 3}
604+
propertyPath: m_LocalRotation.y
605+
value: -0
606+
objectReference: {fileID: 0}
607+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
608+
type: 3}
609+
propertyPath: m_LocalRotation.z
610+
value: -0
611+
objectReference: {fileID: 0}
612+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
613+
type: 3}
614+
propertyPath: m_LocalRotation.w
615+
value: 1
616+
objectReference: {fileID: 0}
617+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
618+
type: 3}
619+
propertyPath: m_RootOrder
620+
value: 2
621+
objectReference: {fileID: 0}
622+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
623+
type: 3}
624+
propertyPath: m_LocalEulerAnglesHint.x
625+
value: 0
626+
objectReference: {fileID: 0}
627+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
628+
type: 3}
629+
propertyPath: m_LocalEulerAnglesHint.y
630+
value: 0
631+
objectReference: {fileID: 0}
632+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
633+
type: 3}
634+
propertyPath: m_LocalEulerAnglesHint.z
635+
value: 0
636+
objectReference: {fileID: 0}
637+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
638+
type: 3}
639+
propertyPath: m_AnchoredPosition.x
640+
value: 150
641+
objectReference: {fileID: 0}
642+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
643+
type: 3}
644+
propertyPath: m_AnchoredPosition.y
645+
value: -237.5
646+
objectReference: {fileID: 0}
647+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
648+
type: 3}
649+
propertyPath: m_SizeDelta.x
650+
value: 300
651+
objectReference: {fileID: 0}
652+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
653+
type: 3}
654+
propertyPath: m_SizeDelta.y
655+
value: 63
656+
objectReference: {fileID: 0}
657+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
658+
type: 3}
659+
propertyPath: m_AnchorMin.x
660+
value: 0
661+
objectReference: {fileID: 0}
662+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
663+
type: 3}
664+
propertyPath: m_AnchorMin.y
665+
value: 1
666+
objectReference: {fileID: 0}
667+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
668+
type: 3}
669+
propertyPath: m_AnchorMax.x
670+
value: 0
671+
objectReference: {fileID: 0}
672+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
673+
type: 3}
674+
propertyPath: m_AnchorMax.y
675+
value: 1
676+
objectReference: {fileID: 0}
677+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
678+
type: 3}
679+
propertyPath: m_Pivot.x
680+
value: 0.5
681+
objectReference: {fileID: 0}
682+
- target: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
683+
type: 3}
684+
propertyPath: m_Pivot.y
685+
value: 0.5
686+
objectReference: {fileID: 0}
687+
- target: {fileID: 4412081284719302609, guid: 1f834fe602c595649a57bd478ffa5942,
688+
type: 3}
689+
propertyPath: m_Name
690+
value: Shadows
691+
objectReference: {fileID: 0}
692+
m_RemovedComponents: []
693+
m_SourcePrefab: {fileID: 100100000, guid: 1f834fe602c595649a57bd478ffa5942, type: 3}
694+
--- !u!224 &908585214 stripped
695+
RectTransform:
696+
m_CorrespondingSourceObject: {fileID: 4412081284719302608, guid: 1f834fe602c595649a57bd478ffa5942,
697+
type: 3}
698+
m_PrefabInstance: {fileID: 908585213}
699+
m_PrefabAsset: {fileID: 0}
490700
--- !u!1 &1040080491
491701
GameObject:
492702
m_ObjectHideFlags: 0
@@ -583,6 +793,7 @@ RectTransform:
583793
m_Children:
584794
- {fileID: 2014194723}
585795
- {fileID: 1400122513}
796+
- {fileID: 908585214}
586797
m_Father: {fileID: 1528141819}
587798
m_RootOrder: 2
588799
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1024,7 +1235,7 @@ Transform:
10241235
m_PrefabAsset: {fileID: 0}
10251236
m_GameObject: {fileID: 1663493755}
10261237
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
1027-
m_LocalPosition: {x: 0, y: 0, z: -2}
1238+
m_LocalPosition: {x: 0, y: 1, z: -2}
10281239
m_LocalScale: {x: 1, y: 1, z: 1}
10291240
m_Children: []
10301241
m_Father: {fileID: 0}
@@ -1496,7 +1707,7 @@ PrefabInstance:
14961707
- target: {fileID: 2886464298844970360, guid: 1f834fe602c595649a57bd478ffa5942,
14971708
type: 3}
14981709
propertyPath: min
1499-
value: 10
1710+
value: 30
15001711
objectReference: {fileID: 0}
15011712
- target: {fileID: 4412081283409038069, guid: 1f834fe602c595649a57bd478ffa5942,
15021713
type: 3}

Fractals Project/Assets/Scenes/_Loading.unity

+2-2
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ Camera:
333333
m_GameObject: {fileID: 1417164539}
334334
m_Enabled: 1
335335
serializedVersion: 2
336-
m_ClearFlags: 2
336+
m_ClearFlags: 4
337337
m_BackGroundColor: {r: 0.11372549, g: 0.12156863, b: 0.16470589, a: 0}
338338
m_projectionMatrixMode: 1
339339
m_GateFitMode: 2
@@ -355,7 +355,7 @@ Camera:
355355
m_Depth: 0
356356
m_CullingMask:
357357
serializedVersion: 2
358-
m_Bits: 4294967295
358+
m_Bits: 32
359359
m_RenderingPath: 3
360360
m_TargetTexture: {fileID: 0}
361361
m_TargetDisplay: 0

Fractals Project/Assets/Scenes/_MainMenu.unity

+13-13
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ MonoBehaviour:
223223
m_OnCullStateChanged:
224224
m_PersistentCalls:
225225
m_Calls: []
226-
m_text: 2D
226+
m_text: '-'
227227
m_isRightToLeft: 0
228228
m_fontAsset: {fileID: 11400000, guid: 59f3347b320f8524086c941a658f4e3b, type: 2}
229229
m_sharedMaterial: {fileID: 300501400175477300, guid: 59f3347b320f8524086c941a658f4e3b,
@@ -293,7 +293,7 @@ MonoBehaviour:
293293
m_margin: {x: 0, y: 0, z: 0, w: 0}
294294
m_textInfo:
295295
textComponent: {fileID: 59568240}
296-
characterCount: 2
296+
characterCount: 1
297297
spriteCount: 0
298298
spaceCount: 0
299299
wordCount: 1
@@ -1380,7 +1380,7 @@ MonoBehaviour:
13801380
m_OnCullStateChanged:
13811381
m_PersistentCalls:
13821382
m_Calls: []
1383-
m_text: 825 MB
1383+
m_text: '-'
13841384
m_isRightToLeft: 0
13851385
m_fontAsset: {fileID: 11400000, guid: 59f3347b320f8524086c941a658f4e3b, type: 2}
13861386
m_sharedMaterial: {fileID: 300501400175477300, guid: 59f3347b320f8524086c941a658f4e3b,
@@ -1450,10 +1450,10 @@ MonoBehaviour:
14501450
m_margin: {x: 0, y: 0, z: 0, w: 0}
14511451
m_textInfo:
14521452
textComponent: {fileID: 735536350}
1453-
characterCount: 6
1453+
characterCount: 1
14541454
spriteCount: 0
1455-
spaceCount: 1
1456-
wordCount: 2
1455+
spaceCount: 0
1456+
wordCount: 1
14571457
linkCount: 0
14581458
lineCount: 1
14591459
pageCount: 1
@@ -2209,7 +2209,7 @@ MonoBehaviour:
22092209
m_OnCullStateChanged:
22102210
m_PersistentCalls:
22112211
m_Calls: []
2212-
m_text: 05 FEB
2212+
m_text: '-'
22132213
m_isRightToLeft: 0
22142214
m_fontAsset: {fileID: 11400000, guid: 59f3347b320f8524086c941a658f4e3b, type: 2}
22152215
m_sharedMaterial: {fileID: 300501400175477300, guid: 59f3347b320f8524086c941a658f4e3b,
@@ -2279,10 +2279,10 @@ MonoBehaviour:
22792279
m_margin: {x: 0, y: 0, z: 0, w: 0}
22802280
m_textInfo:
22812281
textComponent: {fileID: 1234476291}
2282-
characterCount: 6
2282+
characterCount: 1
22832283
spriteCount: 0
2284-
spaceCount: 1
2285-
wordCount: 2
2284+
spaceCount: 0
2285+
wordCount: 1
22862286
linkCount: 0
22872287
lineCount: 1
22882288
pageCount: 1
@@ -2827,7 +2827,7 @@ MonoBehaviour:
28272827
m_PersistentCalls:
28282828
m_Calls:
28292829
- m_Target: {fileID: 496216226}
2830-
m_MethodName: SetSelected
2830+
m_MethodName: set_Selected
28312831
m_Mode: 3
28322832
m_Arguments:
28332833
m_ObjectArgument: {fileID: 0}
@@ -3708,7 +3708,7 @@ MonoBehaviour:
37083708
m_OnCullStateChanged:
37093709
m_PersistentCalls:
37103710
m_Calls: []
3711-
m_text: Mandelbrot
3711+
m_text: Title
37123712
m_isRightToLeft: 0
37133713
m_fontAsset: {fileID: 11400000, guid: 6638258ddc4d85f468270400b9a0214a, type: 2}
37143714
m_sharedMaterial: {fileID: 4290382322653429124, guid: 6638258ddc4d85f468270400b9a0214a,
@@ -3778,7 +3778,7 @@ MonoBehaviour:
37783778
m_margin: {x: 0, y: 0, z: 0, w: 0}
37793779
m_textInfo:
37803780
textComponent: {fileID: 1826455125}
3781-
characterCount: 10
3781+
characterCount: 5
37823782
spriteCount: 0
37833783
spaceCount: 0
37843784
wordCount: 1

Fractals Project/Assets/Scripts/Mandelbrot/Mandelbrot.compute

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Cmplx Multiply(Cmplx a, Cmplx b) {
3535
return x;
3636
}
3737

38-
double GetAbsolute(Cmplx x) {
39-
return sqrt(x.re * x.re + x.im * x.im);
38+
float GetAbsolute(Cmplx x) {
39+
return sqrt(float(x.re * x.re) + float(x.im * x.im));
4040
}
4141

4242
// the math
@@ -80,6 +80,6 @@ void CSMain(uint3 id : SV_DispatchThreadID) {
8080
uint c, s; Colors.GetDimensions(c, s); // get the size of the array
8181
int x = a * (c - 1); // calculate the index
8282
float3 clr = Colors[x]; // get the corresponding color
83-
Texture[id.xy] = float4(clr[0], clr[1], clr[2], 1); // apply
83+
Texture[id.xy] = float4(clr, 1); // apply
8484
}
8585
}

Fractals Project/Assets/Scripts/MengerSponge/MengerSponge.compute

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void CSMain (uint3 id : SV_DispatchThreadID) {
137137
Ray ray = CreateCameraRay(uv);
138138

139139
float2 res = March(ray);
140-
float4 ao = res.x * float4(0.1, 0.74, 0.61, res.y / 10.0);
140+
float4 ao = res.x * float4(0.3, 0.6, 0.7, res.y / 10.0);
141141
float4 fog = 1 / (res.y + 1);
142142
Texture[id.xy] = Source[id.xy] + ao;
143143
//Texture[id.xy] = fog;

0 commit comments

Comments
 (0)