|
|
|
|
|
When shader programs are getting complex one might want to minimize redundant code by placing it into separate files. For example a lighting function can be used in multiple programs and even in different types of shaders - e.g. the fragment or vertex shader. To support this, ACGL can import shader files from within other shader files. This is done by a special pragma:
|
|
|
|
|
|
#pragma ACGLimport "filename"
|
... | ... | @@ -9,6 +8,7 @@ Error messages will state from which included file the error was generated, for |
|
|
|
|
|
Error:
|
|
|
In files:
|
|
|
|
|
|
1 Shader/Foo.fsh
|
|
|
2 Shader/Bar.glsl
|
|
|
1(35) : error C7011: implicit cast from "float" to "vec4"
|
... | ... | |