Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matc fails compilation on ghost token #7820

Open
Nolram12345 opened this issue May 3, 2024 · 0 comments
Open

matc fails compilation on ghost token #7820

Nolram12345 opened this issue May 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working materials Issue/request for the material system

Comments

@Nolram12345
Copy link

Nolram12345 commented May 3, 2024

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):

  1. Append the given fragment shader source file into colorGrading.mat (or any other material) using a #include statement.
  2. 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.

chromatic_aberration.txt

@pixelflinger pixelflinger added bug Something isn't working materials Issue/request for the material system labels May 8, 2024
@pixelflinger pixelflinger self-assigned this May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working materials Issue/request for the material system
Projects
None yet
Development

No branches or pull requests

2 participants