- Unity 2019.3.0f3 or later
Shadow Caster
- Create
ShadowCaster
pass. - Please check if you want a shadow of a raymarching object.
- Create
World Space
- The given
pos
in a distance function becomes world-space one. - If not,
pos
becomes an object-space one.
- The given
Object Scale
- If checked,
pos
in a distance function is scaled by the object scale.
- If checked,
Check If Inside Object
- Check if the camera position is inside the object, and then if so, emit ray from the near clip plane.
- Please set the
Culling
in Material Properties asCull Off
.
Ray Stops At Depth Texture
- The occlusion with the other objects is calculated using the
CameraDepthTexture
. - Please check this with the setting of a transparent object.
- Set
Render Type
asTransparent
. - Set
Render Queue
asTransparent
or greater. - Uncheck
ZWrite
in Material Properties.
- Set
- And please check URP is generating
CameraDepthTexture
or not inDepth Prepass
stage from Frame Debug window.- If you don't use Cascaded Shadow, the texture may not be created.
- The occlusion with the other objects is calculated using the
Ray Starts From Depth Texture
- The ray starts from depth texture to avoid the same calculation done in both
DepthOnly
andForwardLit
passes. - Please check URP is generating
CameraDepthTexture
or not.
- The ray starts from depth texture to avoid the same calculation done in both
- Render Type
RenderType
tag value likeOpaque
,Transparent
, andTransparentCutout
.
- Render Queue
Queue
tag value likeGeometry
,AlphaTest
, andTransparent
.
- LOD
LOD
setting in a shader.
- Object Shape
PostEffectOutput
is the following type in each template.
- UniversalRP > Lit
- Same lighting as the built-in
Universal Render Pipelin/Lit
shader.
- Same lighting as the built-in
- UniversalRP > Unlit
- No lighting, and same as the built-in
Universal Render Pipelin/Unlit
shader.
- No lighting, and same as the built-in