Skip to content

Error compiling shader: 'lambert' : no matching overloaded function found #5

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

Closed
jgmize opened this issue May 31, 2015 · 1 comment
Closed

Comments

@jgmize
Copy link

jgmize commented May 31, 2015

After updating the dependencies in #4 to get lein figwheel working, the page loads and the initial UI is visible, but none of the buttons actually work, unlike the demo on http://demo.thi.ng/geom/resonate-2015/index.html.

I've copied the errors I saw from the dev console below

Error: Error compiling shader:
line 33: 'lambert' : no matching overloaded function found 
float lambertAbs(vec3 surfaceNormal,vec3 lightDirection){return clamp(abs(dot(surfaceNormal,lightDirection)),0.0,1.0);}vec3 surfaceNormal(vec3 normal,mat4 normalMat){return normalize((normalMat*vec4(normal,0.0)).xyz);}vec4 mvp(vec3 pos,mat4 model,mat4 view,mat4 proj){return proj*view*model*vec4(pos,1.0);}void main(){float lambert=lambert(surfaceNormal(normal,normalMat),lightDir);vCol=vec4(ambientCol+diffuseCol*lightCol*lambert,alpha);gl_Position=mvp(position,model,view,proj);}
Stack trace:
thi$ng$common$error$throw_BANG_@http://x1c.local:3449/js/out/thi/ng/common/error.js:5:8
thi$ng$geom$webgl$shaders$parse_and_throw_error@http://x1c.local:3449/js/out/thi/ng/geom/webgl/shaders.js:141:8
thi$ng$geom$webgl$shaders$compile_shader@http://x1c.local:3449/js/out/thi/ng/geom/webgl/shaders.js:154:8
thi$ng$geom$webgl$shaders$make_shader_from_spec@http://x1c.local:3449/js/out/thi/ng/geom/webgl/shaders.js:180:14
resonate2015$day2$demo$init_shaders@http://x1c.local:3449/js/out/resonate2015/day2/demo.js:32:110
resonate2015$day2$demo$start@http://x1c.local:3449/js/out/resonate2015/day2/demo.js:240:642
@http://x1c.local:3449/js/out/resonate2015/day2/handlers.js:58:8
re_frame$middleware$pure_$_pure_handler@http://x1c.local:3449/js/out/re_frame/middleware.js:52:14
re_frame$handlers$handle@http://x1c.local:3449/js/out/re_frame/handlers.js:93:12
switch__22685__auto__@http://x1c.local:3449/js/out/re_frame/router.js:39:18
re_frame$router$state_machine__22686__auto____1/ret_value__22687__auto__<@http://x1c.local:3449/js/out/re_frame/router.js:137:29
re_frame$router$state_machine__22686__auto____1@http://x1c.local:3449/js/out/re_frame/router.js:136:33
re_frame$router$state_machine__22686__auto__@http://x1c.local:3449/js/out/re_frame/router.js:174:1
cljs$core$async$impl$ioc_helpers$run_state_machine@http://x1c.local:3449/js/out/cljs/core/async/impl/ioc_helpers.js:81:8
cljs$core$async$impl$ioc_helpers$run_state_machine_wrapped@http://x1c.local:3449/js/out/cljs/core/async/impl/ioc_helpers.js:84:12
cljs$core$async$impl$ioc_helpers$take_BANG_/temp__4404__auto__<@http://x1c.local:3449/js/out/cljs/core/async/impl/ioc_helpers.js:103:8
cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1/<@http://x1c.local:3449/js/out/cljs/core/async/impl/channels.js:166:8
cljs$core$async$impl$dispatch$process_messages@http://x1c.local:3449/js/out/cljs/core/async/impl/dispatch.js:20:1
goog.async.nextTick.getSetImmediateEmulator_/channel.port1.onmessage@http://x1c.local:3449/js/out/goog/async/nexttick.js:148:7
goog.async.nextTick.getSetImmediateEmulator_/Channel/onmessage<@http://x1c.local:3449/js/out/goog/async/nexttick.js:128:9
 handlers.js:95:0

Error: Error compiling shader:
line 33: 'lambert' : no matching overloaded function found 
float lambertAbs(vec3 surfaceNormal,vec3 lightDirection){return clamp(abs(dot(surfaceNormal,lightDirection)),0.0,1.0);}vec3 surfaceNormal(vec3 normal,mat4 normalMat){return normalize((normalMat*vec4(normal,0.0)).xyz);}vec4 mvp(vec3 pos,mat4 model,mat4 view,mat4 proj){return proj*view*model*vec4(pos,1.0);}void main(){float lambert=lambert(surfaceNormal(normal,normalMat),lightDir);vCol=vec4(ambientCol+diffuseCol*lightCol*lambert,alpha);gl_Position=mvp(position,model,view,proj);} error.js:5:7
@postspectacular
Copy link
Contributor

Hi @jgmize - just pushed a long overdue update after some recent personal outage... fixed! :)

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