Weizhen Huang weizhen
  • Joined on 2022-10-03
Weizhen Huang pushed to cycles-cleanup at weizhen/blender 2024-04-17 12:22:11 +02:00
6759d2fee7 Fix discrepancy with DIRECT_LIGHT_SAMPLING_FORWARD and no MIS for light
Weizhen Huang commented on pull request blender/blender#120714 2024-04-17 11:30:05 +02:00
Cleanup: various cleanups in Cycles kernel

Ah, this is my oversight.

In main the logic of direct_light_sampling_type is that whichever option you set, it should converge to the same result. So even if you choose forward sampling and the…

Weizhen Huang commented on pull request blender/blender#120714 2024-04-16 19:35:33 +02:00
Cleanup: various cleanups in Cycles kernel

@blender-bot build +gpu

Weizhen Huang commented on pull request blender/blender#120714 2024-04-16 19:33:29 +02:00
Cleanup: various cleanups in Cycles kernel

I removed the # ifdef __HAIR__ case here. It should be fine to check (sd->type & PRIMITIVE_TRIANGLE) even when __HAIR__ is not defined?

Weizhen Huang pushed to cycles-cleanup at weizhen/blender 2024-04-16 19:26:43 +02:00
981734fe3e Refactor: deduplicate assignment of background light group
b42bd4829b Refactor: wrap block of codes into a function
14081b1564 Cleanup: remove unnecessary shader flag in Chiang Hair BSDF
Compare 3 commits »
Weizhen Huang created pull request blender/blender#120714 2024-04-16 19:17:20 +02:00
Cleanup: various cleanups in Cycles kernel
Weizhen Huang pushed to cycles-cleanup at weizhen/blender 2024-04-16 19:13:32 +02:00
6439f33848 Refactor: deduplicate assignment of background light group
ac3163f2fc Refactor: wrap block of codes into a function
251ddc83a7 Cleanup: remove unnecessary shader flag in Chiang Hair BSDF
ebc1067209 Cleanup: pass shader flag as parameter instead of ShaderData
60f0b5907b Cleanup: use available function to compute render buffer pointer
Compare 183 commits »
Weizhen Huang suggested changes for blender/blender#118477 2024-04-16 16:49:33 +02:00
Cycles: Add thin film iridescence to Principled BSDF

I did not test this PR thoroughly, just had a first pass. I believe some points in you PR description is outdated, please update them.

Weizhen Huang commented on pull request blender/blender#118477 2024-04-16 16:49:33 +02:00
Cycles: Add thin film iridescence to Principled BSDF

WI think we could default to the IOR of water, which is 1.33.

Weizhen Huang commented on pull request blender/blender#118477 2024-04-16 16:49:32 +02:00
Cycles: Add thin film iridescence to Principled BSDF

Specify the unit (nm).

Weizhen Huang commented on pull request blender/blender#118477 2024-04-16 16:49:31 +02:00
Cycles: Add thin film iridescence to Principled BSDF

Why not sqrtf() here?

Weizhen Huang commented on pull request blender/blender#118477 2024-04-16 16:49:30 +02:00
Cycles: Add thin film iridescence to Principled BSDF

I believe we should trust fresnel_dielectric_polarized() instead of checking TIR before calling the function.

Weizhen Huang commented on pull request blender/blender#118477 2024-04-16 16:49:28 +02:00
Cycles: Add thin film iridescence to Principled BSDF

What is this TODO?

Weizhen Huang commented on pull request blender/blender#118477 2024-04-16 16:49:28 +02:00
Cycles: Add thin film iridescence to Principled BSDF

This function is almost identical as fresnel_dielectric() except for the phase computation, would it be practical to reuse that function? The phase computation could then be:

Weizhen Huang pushed to restir at weizhen/blender 2024-04-16 14:52:05 +02:00
da4c2bdc0f Add spatial resampling
Weizhen Huang pushed to restir at weizhen/blender 2024-04-16 00:08:51 +02:00
7e0ff553da Refactor: make restir an init function
5d56337f80 Cleanup: comments, change function parameters, split reservoir and sd
b1f3649604 Refactor: move 1/pdf to weight instead of a multiplicator of radiance
e49376f06d Remove ReSTIR from megakernel
4c775a220c Fix function parameter difference in declaration and definition
Compare 230 commits »
Weizhen Huang pushed to restir at weizhen/blender 2024-04-15 14:56:33 +02:00
10c002349e Fix point light zero radius ls->t not written
aef5054931 Read reservoir in a second pass
b8c8f63c19 Fix: point light t and P not written
2942e4b8cf Refactor: write to reservoir only when it is direct illumination
2a8c152aae Cleanup: split restir.h and reservoir.h
Compare 8 commits »
Weizhen Huang pushed to cycles-cleanup at weizhen/blender 2024-04-13 12:04:41 +02:00
c0e779b632 Cleanup: deduplicate assignment of background light group
Weizhen Huang pushed to cycles-cleanup at weizhen/blender 2024-04-13 11:31:49 +02:00
b40cfe6c61 Cleanup: deduplicate assignment of background light group
Weizhen Huang pushed to restir at weizhen/blender 2024-04-12 16:48:21 +02:00
2ee468d2ed Also support point light
c500227a4e Refactor: shuffle some code around in Cycles light
Compare 2 commits »