You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a custom layer (+shader) I'd like to have access to the project module in the fragment shader. So I've tried to port the project module to a fs-module using the following, naive, approach (using the scripting api) (code simplified, not a full working example):
functiongetModel(gl){// setup fs, vs and geometry// ...// first port the fp32 moduleconstfp32=deck.project.dependencies[0]// I couldnt find the fp32 module in `luma` so had to extract it from project dependencies insteadconstfragFp32={name: 'fragFp32',fs: fp32.vs}// then port the project moduleconstfragProject={name: 'fragProject',dependencies: [fragFp32],fs: deck.project.vs,getUniforms: deck.project.getUniforms}returnnewluma.Model(gl,{vs: myCustomVS,fs: myCustomFS,
myCustomGeometry,isInstanced: true,modules: [fragProject],});}
Without adding fragProject as a module to my Model the layer renders just fine. However, when I add it as a module, the layer doesn't render. There are no errors in the logs, which make me think that at least this compiles just fine (compiler errors do show up in the log).
I can use the fragFp32 module directly just fine. So the error seems to be in fragProject. My guess would then be somewhere with getUniforms but I'm not sure what exactly. Can someone help me with this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For a custom layer (+shader) I'd like to have access to the project module in the fragment shader. So I've tried to port the project module to a fs-module using the following, naive, approach (using the scripting api) (code simplified, not a full working example):
Without adding
fragProjectas a module to myModelthe layer renders just fine. However, when I add it as a module, the layer doesn't render. There are no errors in the logs, which make me think that at least this compiles just fine (compiler errors do show up in the log).I can use the
fragFp32module directly just fine. So the error seems to be infragProject. My guess would then be somewhere withgetUniformsbut I'm not sure what exactly. Can someone help me with this?Beta Was this translation helpful? Give feedback.
All reactions