Relative require paths need updating
gregtatum opened this issue · comments
Greg Tatum commented
I'm running into this while working on: gregtatum/gl-engine#6
Take a folder structure like this:
/glam/fog/struct.glsl
/glam/fog/vars.glsl
/glam/material/index.glsl
In /glam/material/index.glsl
I have
#pragma glslify: import('../fog/vars.glsl')
void main() { ... }
Then in /glam/fog/vars.glsl
#pragma glslify: Fog = require('./struct.glsl')
uniform Fog uFog;
The #pragma glslify: Fog = require('./struct.glsl')
gets inlined without the relative path being updated, so the glslify require step can't find my struct.glsl
file.