Skip to content

Commit

Permalink
SDF Marcher
Browse files Browse the repository at this point in the history
Increased sdf min step area
Removed incorrect scalar for sdf to local distance calculation
  • Loading branch information
Ikaroon committed Jun 16, 2022
1 parent 8a18ee8 commit ee9bb96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Runtime/Shaders/Lib/TMP3D_Common.cginc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ float3 PositionToMask(float3 localPos, tmp3d_g2f input)
float GradientToLocalLength(tmp3d_g2f input, float value, float offset)
{
float gradientUV = _GradientScale / _TextureHeight;
float gradientRelative = gradientUV / (input.boundariesUV.w * 2);
float gradientRelative = gradientUV / input.boundariesUV.w;
float localM = input.boundariesLocal.w * gradientRelative;

float min = -(localM * offset);
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Shaders/TMP3D_Unlit.shader
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Shader "TextMeshPro/3D/Unlit"
_WeightNormal("Weight Normal", Range(0,1)) = 0.5

// 3D
_RaymarchMinStep("Raymarch min step", Range(0.001, 0.01)) = 0.001
_RaymarchMinStep("Raymarch min step", Range(0.001, 0.1)) = 0.01
_RaymarchStepLength("Raymarch step length", Range(0.001, 1)) = 0.1
_RaymarchBlueNoise("Raymarch Blue Noise", 2DArray) = "black" {}
_RaymarchBlueNoise_Slices("Raymarch Blue Noise Slices", float) = 1
Expand Down

0 comments on commit ee9bb96

Please sign in to comment.