Bug when porting shaders to new pipeline?

Hello, I recently filed this bug report regarding an issue I’ve encountered when porting my shaders to the new pipeline: Behavior changes when porting shader to new pipeline -- some render constants ignored? · Issue #9405 · defold/defold · GitHub

I’d like to provide a bit of context for discussion here too, in case anyone else has encountered it:

I was working on a 3D project using the old shader pipeline. After upgrading to 1.9.2, I migrated my shaders to the new pipeline, and noticed that my lights didn’t seem to work properly anymore. I created a basic 3D project to try to isolate the issue, and as far as I can tell, it seems that some of the render constants aren’t being passed correctly to the shaders. Specifically, on the Lua side I’m gathering the world positions of my point light GOs, putting them in an array, and passing that into the draw calls. But in the shader, my lights appear to be at the camera position, which suggests that maybe the position vectors of the lights are zeroed out. However, I’m also passing other render constants into the shader (such as the colors and radii of the lights), and those seem to be working correctly.

Anyone else run into such issues when migrating their shaders to the new pipeline?

Thanks for the repro, I’ll take a look this week :+1:

1 Like

Just want to note here that this is a manifestation of Constants are not globally shared in graphics adapters · Issue #9341 · defold/defold · GitHub

Workaround for now is to make sure different shaders don’t share uniforms with the same names.

2 Likes