Skip to content

Commit f84becc

Browse files
committed
Create Lava
1 parent d3fd1c1 commit f84becc

File tree

14 files changed

+666
-6
lines changed

14 files changed

+666
-6
lines changed

.idea/.idea.unity-demoscene/.idea/contentModel.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Demoscene/Projects/2018-05-28-Sandwich/Sandwich.unity

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ Transform:
223223
m_PrefabParentObject: {fileID: 0}
224224
m_PrefabInternal: {fileID: 0}
225225
m_GameObject: {fileID: 509048559}
226-
m_LocalRotation: {x: -0, y: 1, z: -0, w: 0}
227-
m_LocalPosition: {x: -0.04410826, y: 0.60638976, z: 11.041107}
228-
m_LocalScale: {x: 0.0001, y: 0.0001, z: 0.0001}
226+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
227+
m_LocalPosition: {x: 0, y: 0, z: 1}
228+
m_LocalScale: {x: 1, y: 1, z: 1}
229229
m_Children: []
230230
m_Father: {fileID: 1561136793}
231231
m_RootOrder: 0
@@ -252,7 +252,7 @@ MeshRenderer:
252252
m_Enabled: 1
253253
m_CastShadows: 0
254254
m_ReceiveShadows: 1
255-
m_DynamicOccludee: 1
255+
m_DynamicOccludee: 0
256256
m_MotionVectors: 0
257257
m_LightProbeUsage: 0
258258
m_ReflectionProbeUsage: 1

Assets/Demoscene/Projects/2018-05-28-Sandwich/uRaymarchingShaders/WorldSandwich.mat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Material:
2020
m_TexEnvs: []
2121
m_Floats:
2222
- _Glossiness: 0.5
23-
- _LocalTime: 0
23+
- _LocalTime: 1.9688673
2424
- _Loop: 100
2525
- _Metallic: 0.5
2626
- _MinDistance: 0.01

Assets/Demoscene/Projects/2018-07-10-Cellular/Cellular.shader

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#pragma multi_compile_fog
1919

2020
#include "UnityCG.cginc"
21-
#include "Assets/Demoscene/Shaders/Includes/PortingFromGLSL.cginc"
2221
#include "Assets/Demoscene/Shaders/Includes/Noise.cginc"
2322

2423
struct appdata

Assets/Demoscene/Projects/2018-07-12-Lava.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_PrefabParentObject: {fileID: 0}
7+
m_PrefabInternal: {fileID: 0}
8+
m_GameObject: {fileID: 0}
9+
m_Enabled: 1
10+
m_EditorHideFlags: 0
11+
m_Script: {fileID: 11500000, guid: 3acd6fe57257048db802c1c4c2b75248, type: 3}
12+
m_Name: Lava
13+
m_EditorClassIdentifier:
14+
shaderName: Lava
15+
shaderReference: {fileID: 4800000, guid: 5c314efc8c9d8449ab45d6dd0183c06e, type: 3}
16+
shaderTemplate: uRaymarching/Direct GBuffer Custom
17+
variables:
18+
- key: Name
19+
value: Lava
20+
- key: Culling
21+
value: Off
22+
- key: RaymarchingShaderDirectory
23+
value: Assets/uRaymarching/Shaders/Include
24+
conditions:
25+
- key: ShadowCaster
26+
value: 1
27+
- key: WorldSpace
28+
value: 1
29+
- key: FollowObjectScale
30+
value: 0
31+
- key: DoNotOutputDepth
32+
value: 0
33+
- key: CameraInsideObject
34+
value: 0
35+
- key: FallbackToDiffuse
36+
value: 1
37+
blocks:
38+
- key: Properties
39+
value: // _Color2("Color2", Color) = (1.0, 1.0, 1.0, 1.0)
40+
folded: 0
41+
- key: DistanceFunction
42+
value: "inline float DistanceFunction(float3 pos)\n{\n return Sphere(pos, 0.5);\n}"
43+
folded: 0
44+
- key: PostEffect
45+
value: 'inline void PostEffect(RaymarchInfo ray, inout PostEffectOutput o)
46+
47+
{
48+
49+
}'
50+
folded: 0
51+
constants: {fileID: 11400000, guid: 4df15a420345e4af98645ddd9620aa5b, type: 2}
52+
basicFolded: 1
53+
conditionsFolded: 0
54+
variablesFolded: 0
55+
materialsFolded: 0
56+
constantsFolded: 0

Assets/Demoscene/Projects/2018-07-12-Lava/Lava.asset.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 6
6+
m_ObjectHideFlags: 0
7+
m_PrefabParentObject: {fileID: 0}
8+
m_PrefabInternal: {fileID: 0}
9+
m_Name: Lava
10+
m_Shader: {fileID: 4800000, guid: 5c314efc8c9d8449ab45d6dd0183c06e, type: 3}
11+
m_ShaderKeywords:
12+
m_LightmapFlags: 4
13+
m_EnableInstancingVariants: 0
14+
m_DoubleSidedGI: 0
15+
m_CustomRenderQueue: -1
16+
stringTagMap: {}
17+
disabledShaderPasses: []
18+
m_SavedProperties:
19+
serializedVersion: 3
20+
m_TexEnvs: []
21+
m_Floats:
22+
- _Loop: 30
23+
- _MinDistance: 0.01
24+
- _ShadowExtraBias: 0.01
25+
- _ShadowLoop: 10
26+
- _ShadowMinDistance: 0.01
27+
m_Colors:
28+
- _Diffuse: {r: 0, g: 0.041553974, b: 1, a: 0.4627451}
29+
- _Emission: {r: 0, g: 0, b: 0, a: 0}
30+
- _Specular: {r: 1, g: 0, b: 0, a: 1}

Assets/Demoscene/Projects/2018-07-12-Lava/Lava.mat.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
Shader "Raymarching/Lava"
2+
{
3+
4+
Properties
5+
{
6+
[Header(GBuffer)]
7+
_Diffuse("Diffuse", Color) = (1.0, 1.0, 1.0, 1.0)
8+
_Specular("Specular", Color) = (0.0, 0.0, 0.0, 0.0)
9+
_Emission("Emission", Color) = (0.0, 0.0, 0.0, 0.0)
10+
11+
[Header(Raymarching Settings)]
12+
_Loop("Loop", Range(1, 100)) = 30
13+
_MinDistance("Minimum Distance", Range(0.001, 0.1)) = 0.01
14+
_ShadowLoop("Shadow Loop", Range(1, 100)) = 10
15+
_ShadowMinDistance("Shadow Minimum Distance", Range(0.001, 0.1)) = 0.01
16+
_ShadowExtraBias("Shadow Extra Bias", Range(0.0, 1.0)) = 0.01
17+
18+
// @block Properties
19+
// _Color2("Color2", Color) = (1.0, 1.0, 1.0, 1.0)
20+
// @endblock
21+
}
22+
23+
SubShader
24+
{
25+
26+
Tags
27+
{
28+
"RenderType" = "Opaque"
29+
"DisableBatching" = "True"
30+
}
31+
32+
Cull Off
33+
34+
CGINCLUDE
35+
36+
#define WORLD_SPACE
37+
38+
#define DISTANCE_FUNCTION DistanceFunction
39+
#define POST_EFFECT PostEffect
40+
#define PostEffectOutput GBufferOut
41+
42+
#include "Assets/uRaymarching/Shaders/Include/Common.cginc"
43+
#include "Assets/uRaymarchingCustom/Common.cginc"
44+
#include "Assets/Demoscene/Shaders/Includes/Noise.cginc"
45+
46+
// @block DistanceFunction
47+
inline float DistanceFunction(float3 pos)
48+
{
49+
float2 c = cellular(float3(pos.xz, _Time.y));
50+
return pos.y - (c.y - c.x);
51+
}
52+
// @endblock
53+
54+
// @block PostEffect
55+
inline void PostEffect(RaymarchInfo ray, inout PostEffectOutput o)
56+
{
57+
}
58+
// @endblock
59+
60+
#include "Assets/uRaymarching/Shaders/Include/Raymarching.cginc"
61+
62+
ENDCG
63+
64+
Pass
65+
{
66+
Tags { "LightMode" = "Deferred" }
67+
68+
Stencil
69+
{
70+
Comp Always
71+
Pass Replace
72+
Ref 128
73+
}
74+
75+
CGPROGRAM
76+
#include "Assets/uRaymarching/Shaders/Include/VertFragDirectScreen.cginc"
77+
#pragma target 3.0
78+
#pragma vertex Vert
79+
#pragma fragment Frag
80+
#pragma exclude_renderers nomrt
81+
#pragma multi_compile_prepassfinal
82+
#pragma multi_compile ___ UNITY_HDR_ON
83+
#pragma multi_compile OBJECT_SHAPE_CUBE OBJECT_SHAPE_SPHERE ___
84+
ENDCG
85+
}
86+
87+
Pass
88+
{
89+
Tags { "LightMode" = "ShadowCaster" }
90+
91+
CGPROGRAM
92+
#include "Assets/uRaymarching/Shaders/Include/VertFragShadowObject.cginc"
93+
#pragma target 3.0
94+
#pragma vertex Vert
95+
#pragma fragment Frag
96+
#pragma fragmentoption ARB_precision_hint_fastest
97+
#pragma multi_compile_shadowcaster
98+
#pragma multi_compile OBJECT_SHAPE_CUBE OBJECT_SHAPE_SPHERE ___
99+
ENDCG
100+
}
101+
102+
}
103+
104+
Fallback "Diffuse"
105+
106+
CustomEditor "uShaderTemplate.MaterialEditor"
107+
108+
}

0 commit comments

Comments
 (0)