You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When attempting to compile a material that #includes the attached fragment shader file, the compile fails on a non-existent character (Ç).
To Reproduce
Steps to reproduce the behavior (not tested yet):
Append the given fragment shader source file into colorGrading.mat (or any other material) using a #include statement.
Attempt to compile the material with matc.
Expected behavior
The shader should compile correctly (or at least error on an actual error) and not fail on this non-existent symbol.
Logs
[61/185] Compiling material N:/BDE/filament/filament/src/materials/colorGrading/colorGrading.mat to N:/BDE/filament/cmake-build-release-visual-studio/filament/generated/material/colorGrading.filamat
FAILED: filament/generated/material/colorGrading.filamat N:/BDE/filament/cmake-build-release-visual-studio/filament/generated/material/colorGrading.filamat
cmd.exe /C "cd /D N:\BDE\filament\cmake-build-release-visual-studio\filament && N:\BDE\filament\cmake-build-release-visual-studio\tools\matc\matc.exe -a opengl -a vulkan -p desktop -o N:/BDE/filament/cmake-build-release-visual-studio/filament/generated/material/colorGrading.filamat N:/BDE/filament/filament/src/materials/colorGrading/colorGrading.mat"
ERROR: Unable to parse fragment shader:
ERROR: ../../../../shaders/src/chromatic_aberration.fs:1: 'Ç' : unexpected token
ERROR: 1 compilation errors. No code generated.
Additional context
Tried this on Windows 10 22H2, using Clion as an IDE, on a fresh clone of the Filament repository.
This issue may be user error - I'm only just attempting to get my bearings in working with Filament's internals by implementing a simple post-processing effect.
I had to attach the .fs file renamed to a .txt due to GitHub limitations.
Not sure how your file was created, but if you look at the hexcode, you'll see non-ascii chars in the first few bytes., using xxd chromatic_aberration.txt, we see
This file was created by creating a new file in Clion, the IDE recommended for Filament development. No idea how that got there.
What formatting does matc expect as input?
With testing, it looks like matc can handle CRLF (windows new line) fine. So it's probably just those errant bytes at the beginning that was the problem. I don't know if there's a strict definition of the input for matc, but as long as you can fix those bytes, you're good I think.
Describe the bug
When attempting to compile a material that #includes the attached fragment shader file, the compile fails on a non-existent character (Ç).
To Reproduce
Steps to reproduce the behavior (not tested yet):
Expected behavior
The shader should compile correctly (or at least error on an actual error) and not fail on this non-existent symbol.
Logs
Additional context
Tried this on Windows 10 22H2, using Clion as an IDE, on a fresh clone of the Filament repository.
This issue may be user error - I'm only just attempting to get my bearings in working with Filament's internals by implementing a simple post-processing effect.
I had to attach the .fs file renamed to a .txt due to GitHub limitations.
chromatic_aberration.txt
The text was updated successfully, but these errors were encountered: