very small cleanups in Luxcore code

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

very small cleanups in Luxcore code

Post by Luxart »

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"
"\n"
"		shadeN = Texture_Bump(mats[matIndex].bumpTexIndex, hitPoint, mats[matIndex].bumpSampleDistance\n"
"			TEXTURES_PARAM);\n"
"\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
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: very small cleanups in Luxcore code

Post by Dade »

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