three-csm icon indicating copy to clipboard operation
three-csm copied to clipboard

program not valid with latest three.js

Open aiden-jeffrey opened this issue 2 years ago • 11 comments

I'm seeing this error trying to use your library on a recent three.js release (r157):

three.module.js:19999 THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false

Program Info Log: Fragment shader is not compiled.

aiden-jeffrey avatar Nov 07 '23 11:11 aiden-jeffrey

Looks like this was the PR that broke things: https://github.com/mrdoob/three.js/pull/26805

aiden-jeffrey avatar Nov 07 '23 11:11 aiden-jeffrey

I didn't want to use the three.js version mainly because they don't expose lightColor in the constructor.

aiden-jeffrey avatar Nov 07 '23 11:11 aiden-jeffrey

Had a stab at applying that diff to your shader: https://github.com/StrandedKitty/three-csm/pull/40

aiden-jeffrey avatar Nov 07 '23 11:11 aiden-jeffrey

@aiden-jeffrey your fork doesn't seem to work for me in three 159, running this fails

 npm i aiden-jeffrey/three-csm#aiden/three-157

Sceat avatar Dec 24 '23 20:12 Sceat

any updates?

tolgaand avatar Feb 05 '24 13:02 tolgaand

any updates?

I just used the three.js fork of this in the end. I'm sure that the PR I linked is most of the way there, but I couldn't get the shadows to render.

aiden-jeffrey avatar Feb 05 '24 14:02 aiden-jeffrey

I'm sure that the PR I linked is most of the way there, but I couldn't get the shadows to render.

Just tried your fix with three.js 162 and I do have shadows!

ebeaufay avatar Mar 09 '24 10:03 ebeaufay

I'm sure that the PR I linked is most of the way there, but I couldn't get the shadows to render.

Just tried your fix with three.js 162 and I do have shadows!

How you did it? I mean three-csm working with three 162.

I have this problem.

image

DawidSmuga avatar Mar 24 '24 20:03 DawidSmuga

How you did it? I mean three-csm working with three 162.

I forked CSM (actually just copied the files from the threejs samples: CSM.js, CSMFrustum.js and CSMShader.js) Then I applied the fix from @aiden-jeffrey and I use my local version of CSM for now.

The file with the fix is here: https://github.com/ebeaufay/UltraGlobe/blob/master/src/csm/CSMShader.js

ebeaufay avatar Mar 24 '24 20:03 ebeaufay

How you did it? I mean three-csm working with three 162.您是怎么做到的?我的意思是 three-csm 与三个 162 一起工作。

I forked CSM (actually just copied the files from the threejs samples: CSM.js, CSMFrustum.js and CSMShader.js)我分叉了 CSM(实际上只是从 threejs 示例中复制了文件:CSM.js、CSMFrustum.js 和 CSMShader.js) Then I applied the fix from @aiden-jeffrey and I use my local version of CSM for now.然后我应用了修复程序,现在使用我的本地版本的 CSM。

The file with the fix is here: https://github.com/ebeaufay/UltraGlobe/blob/master/src/csm/CSMShader.js

目前链接访问不了,方便告诉我您修改哪里嘛?

qing-nv avatar Mar 24 '25 06:03 qing-nv

this is fixed in the samples of the latest versions of three.js. if you're using an older version of three.js, I guess you'll need to go through the chang-logs to see what the fix was

ebeaufay avatar Mar 24 '25 06:03 ebeaufay