Behavior changes when porting shader to new pipeline -- some render constants ignored?
- Dominant language
- C++
- Stars
- 6.3k
- Forks
- 455
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 129
Description
**Describe the bug (REQUIRED)**
I have a simple 3D scene that originally used the old shader pipeline. In my Lua code, I set up a few arrays of point light data (representing the light positions, colors, and radii), and pass those into my shader using render constants in a custom render script. Everything worked fine.
After upgrading to 1.9.2, I upgraded the shaders to the new pipeline, following the migration guide in the manual. Now the positions of the point lights are wrong -- they appear to be located at the camera position, as if the values in the render constants are being ignored. (However, the light colors and radii appear to be passed to the shader correctly.)
**To Reproduce (REQUIRED)**
Steps to reproduce the behavior:
I've created a small project at https://github.com/akhleung/Defold_Basic_3D that should demonstrate the issue. First, try running the `old-pipeline` branch to see the original correct behavior, then run the `new-pipeline` branch to see the buggy behavior.
**Expected behavior (REQUIRED)**
In the `new-pipeline` branch, the green light should appear to come from the left, and the red light should appear to come from the right. However, the lights appear to come from the camera position.
**Defold version (REQUIRED):**
- 1.9.2
**Platforms (REQUIRED):**
- Windows 10
- Samsung Galaxy Book Pro, Intel Iris XE graphics
**Minimal repro case project (OPTIONAL):**
https://github.com/akhleung/Defold_Basic_3D
**Workaround (OPTIONAL):**
Use the old shader pipeline
Contributor guide
Assessment
This issue has not been assessed yet.