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

If the base material has a map, a CSM from it throws an error on three >= 0.151.0 #35

Closed
hamzakubba opened this issue Mar 31, 2023 · 1 comment

Comments

@hamzakubba
Copy link

hamzakubba commented Mar 31, 2023

Managed to repro here:
https://codesandbox.io/s/customshadermaterial-hero-forked-0976xh?file=/src/App.jsx
you do need to open your browser console to see this as it doesn't show up in CSB's console.

I believe this is related to this change https://github.com/mrdoob/three.js/pull/25740/files#diff-202a730a51aad3c22e059efd980a6cd5c5d0637a6abd240b3bdee3e5ff30aaa2L530 from this PR mrdoob/three.js#25740

Relevant error (line numbers may be different):

FRAGMENT ERROR: 0:1553: 'vUv' : undeclared identifier

  1548:     #if defined IS_UNKNOWN || defined IS_SHADERMATERIAL || defined IS_MESHDEPTHMATERIAL || defined IS_MESHNORMALMATERIAL || defined IS_SHADOWMATERIAL
  1549:         vec4 csm_DiffuseColor = vec4(1., 0., 1., 1.);
  1550:         vec4 csm_FragColor = vec4(1., 0., 1., 1.);
  1551:     #else
  1552:         #ifdef USE_MAP
> 1553:             vec4 _csm_sampledDiffuseColor = texture2D(map, vUv);
  1554: 
  1555:             #ifdef DECODE_VIDEO_TEXTURE

I'm not entirely sure this can be fixed on this end... thanks! :)

PS: opened corresponding issue on three's repo: mrdoob/three.js#25742

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

No branches or pull requests

2 participants