Skip to content

Commit

Permalink
refactor: shader name
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhhkrx committed Jul 19, 2024
1 parent 11315e3 commit 0b58091
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ if (all(lessThanEqual(abs(x0), x1)))
return scale * y + bias;
}

// Normalized SG
// Normalized sg
FsphericalGaussian makeNormalizedSG(vec3 lightdir , vec3 sharpness)
{
FsphericalGaussian SG;
SG.Axis = lightdir;
SG.Sharpness = sharpness;
SG.Amplitude = SG.Sharpness /((2.0 * PI) * (1.0 - exp(-2.0 * SG.Sharpness)));
return SG;
FsphericalGaussian sg;
sg.Axis = lightdir;
sg.Sharpness = sharpness;
sg.Amplitude = sg.Sharpness /((2.0 * PI) * (1.0 - exp(-2.0 * sg.Sharpness)));
return sg;
}

vec3 sgdiffuseLighting(vec3 light ,vec3 normal ,vec3 scatterAmt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ void surfaceShadingSSS(Varyings varyings, SurfaceData surfaceData, BRDFData brdf

float skintexture = skinCurvatureTexture.r * material_CurvaturePower ;
vec3 scatterAmt = material_SkinScatterAmount.rgb * skintexture;
vec3 SG = sgdiffuseLighting(incidentDirection, surfaceData.normal, scatterAmt);
vec3 irradiance = SG * lightColor * PI;
vec3 sg = sgdiffuseLighting(incidentDirection, surfaceData.normal, scatterAmt);
vec3 irradiance = sg * lightColor * PI;

// ClearCoat Lobe
float attenuation = clearCoatLobe(varyings, surfaceData, brdfData, incidentDirection, lightColor, specularColor);
Expand Down

0 comments on commit 0b58091

Please sign in to comment.