Hello community,
On the past weeks I’ve spend some time to port a legacy architecture to a TSL architecture,
I wish I could help more by sending PR’s to the WebGPU renderer / TSL but I’m having hard time to understand how this machinery works
I’ve tried to implement a colorContribution property on lighting it in the current system to setup a light that only produces shadow ( for real time shadow purpose ), but a few things are a mistery to me
In this function here, on the setup of the directionallightnode for example, bypassing the lightingModel.direct function should logically be the way to not render any color contribution from the lighting like :
setup( builder ) {
super.setup( builder );
const lightingModel = builder.context.lightingModel;
const lightColor = this.colorNode;
const lightDirection = lightTargetDirection( this.light );
const reflectedLight = builder.context.reflectedLight;
if( this.light.colorContribution == true ){
lightingModel.direct( {
lightDirection,
lightColor,
reflectedLight
}, builder.stack, builder );
}
}
But for some reasons by-passing this block prevent the push of the shadowNode into the updateBeforeNodes map that update the shadow
I’ve been trying to debug the stack longly, but cannot find any clue on how to proceed here, seems like there are some internal systems I’m not aware of
Any help ? @sunag