Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only one shadow map enabled with fromLightSource=false caused error #6873

Closed
flyingdq opened this issue Aug 2, 2018 · 1 comment · Fixed by #6883
Closed

only one shadow map enabled with fromLightSource=false caused error #6873

flyingdq opened this issue Aug 2, 2018 · 1 comment · Fixed by #6883
Assignees

Comments

@flyingdq
Copy link

flyingdq commented Aug 2, 2018

I usually want to use shadow map to do some postprocessing effects, and i use only one shadow map enabled which set fromLightSource to false.

so ShadowMap.createDerivedCommands will create nothing about the receive commands.
But in OIT.js, it shows below:

for (j = 0; j < length; ++j) {
command = commands[j];
command = defined(command.derivedCommands.logDepth) ? command.derivedCommands.logDepth.command : command;
derivedCommand = (shadowsEnabled && command.receiveShadows) ? command.derivedCommands.oit.shadows.translucentCommand : command.derivedCommands.oit.translucentCommand;
executeFunction(derivedCommand, scene, context, passState, debugFramebuffer);
}

it will cause error:
TypeError: Cannot read property 'translucentCommand' of undefined
since command.derivedCommands.oit.shadows is undefined

missing lightShadowMapsEnabled flag while excute the commands?

@hpinkos
Copy link
Contributor

hpinkos commented Aug 2, 2018

@lilleyse any ideas here?

@lilleyse lilleyse self-assigned this Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants