summaryrefslogtreecommitdiffstats
path: root/yum_brdf.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-07-30 17:10:34 -0700
committeryum <yum.food.vr@gmail.com>2025-07-30 17:13:36 -0700
commitbe4c8a8ee8eaf892d008835225dfd897d259d793 (patch)
treeeadb32c3c0351a71225a98f0df95e4dcdf359833 /yum_brdf.cginc
parenteba91b479fb6476fed06b13906d7805f43f879b6 (diff)
buncha shit
- overhaul gradient normals to take a (dFy/dx, dFy/dz) input, and optionally two more: (dFx/dx, dFx/dz) and (dFz/dx, dFz/z) - this is what fft water needs - put YumPbr into data.cginc - fix tessellation compiler errors - remove tessellation frustum culling, seems to have been buggy - remove not impactful brdf code
Diffstat (limited to 'yum_brdf.cginc')
-rw-r--r--yum_brdf.cginc6
1 files changed, 2 insertions, 4 deletions
diff --git a/yum_brdf.cginc b/yum_brdf.cginc
index 2d07440..6a9031f 100644
--- a/yum_brdf.cginc
+++ b/yum_brdf.cginc
@@ -163,18 +163,16 @@ float4 YumBRDF(v2f i, const YumLighting light, YumPbr pbr) {
const float3 f0 = lerp(dielectric_f0, pbr.albedo, pbr.metallic);
const float3 dfg = PrefilteredDFG_LUT(pbr.roughness_perceptual, NoV);
const float3 E = specularDFG(dfg, f0);
- const float3 energy_compensation = energyCompensation(dfg, f0);
+ const float3 energy_compensation = energyCompensation(dfg, f0);
// Compute specular ambient occlusion
float diffuseAO = pbr.ao;
- float specularAO = computeSpecularAO(NoV, diffuseAO * light.occlusion, pbr.roughness);
- float3 specularSingleBounceAO = singleBounceAO(specularAO) * energy_compensation;
// Use proper diffuse color calculation
float3 diffuseColor = computeDiffuseColor(pbr.albedo, pbr.metallic);
float3 Fd = diffuseColor * light.diffuse * (1.0 - E) * pbr.ao;
- float3 Fr = E * light.specular * specularSingleBounceAO;
+ float3 Fr = E * light.specular;
indirect_standard = Fr + Fd;
}