very small cleanups in Luxcore code

Discussion related to the Engine functionality, implementations and API.
Post Reply
Posts: 48
Joined: Tue Feb 13, 2018 10:14 am

very small cleanups in Luxcore code

Post by Luxart » Mon Apr 30, 2018 7:40 am

Hi Dade,

As I already mentioned in another thread viewtopic.php?f=4&t=142

very small cleanups in Luxcore code.

1, In GetOpenCLBSDFSize() function

Code: Select all

	// Add BSDF.isShadowCatcher

		bsdfSize += sizeof(int);
is not needed as we are only using materials - isShadowCatcher

2, In Material_Bump function.

Code: Select all

"	float3 shadeN = VLOAD3F(&hitPoint->shadeN.x);\n"
"		shadeN = Texture_Bump(mats[matIndex].bumpTexIndex, hitPoint, mats[matIndex].bumpSampleDistance\n"
The ShadeN is assigned two times. First line can be removed (with type declaration float3 moved to second line).

3, In DirectLight_BSDFSampling() function, cosThetaToLight is calculated, but never used.

Code: Select all

"	const float cosThetaToLight = fabs(dot(lightRayDir, VLOAD3F(&bsdf->hitPoint.shadeN.x)));\n"
may be previous Luxrender versions used it.

You might have missed to comment or delete these lines ;) .
All the above lines are not a big deal, but just thought of mentioning it.

Yes strictly from next time I will use github requests to make these changes :) .

User avatar
Posts: 2388
Joined: Mon Dec 04, 2017 8:36 pm

Re: very small cleanups in Luxcore code

Post by Dade » Mon Apr 30, 2018 9:37 am

Thanks, I pushed the code on the denoiser branch so it will be merged with the main branch after the v2.0 release: ... 6fe4495a56
Support LuxCoreRender project with salts and bounties

Post Reply