mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-18 06:03:48 +00:00
Merge pull request #54 from Azaezel/alpha40CompilerCorrection
shader compiler correction
This commit is contained in:
commit
732f76b576
2 changed files with 3 additions and 3 deletions
|
|
@ -58,8 +58,8 @@ vec3 FresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness)
|
|||
|
||||
float Fr_DisneyDiffuse(float NdotV, float NdotL, float LdotH, float linearRoughness)
|
||||
{
|
||||
float energyBias = lerp(0, 0.5, linearRoughness);
|
||||
float energyFactor = lerp(1.0, 1.0 / 1.51, linearRoughness);
|
||||
float energyBias = lerp(0.0f, 0.5f, linearRoughness);
|
||||
float energyFactor = lerp(1.0f, 1.0f / 1.51f, linearRoughness);
|
||||
float fd90 = energyBias + 2.0 * LdotH*LdotH * linearRoughness;
|
||||
vec3 f0 = vec3(1.0f, 1.0f, 1.0f);
|
||||
float lightScatter = F_Schlick(f0, fd90, NdotL).r;
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ void updateSurface(inout Surface surface)
|
|||
surface.NdotV = abs(dot(surface.N, surface.V)) + 1e-5f; // avoid artifact
|
||||
|
||||
surface.albedo = surface.baseColor.rgb * (1.0 - surface.metalness);
|
||||
surface.f0 = lerp(vec3(0.04), surface.baseColor.rgb, surface.metalness);
|
||||
surface.f0 = lerp(vec3(0.04f), surface.baseColor.rgb, surface.metalness);
|
||||
surface.R = -reflect(surface.V, surface.N);
|
||||
float f90 = saturate(50.0 * dot(surface.f0, vec3(0.33,0.33,0.33)));
|
||||
surface.F = F_Schlick(surface.f0, f90, surface.NdotV);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue