GabeRundlett / gvox_engine

MIT License
332 stars 18 forks source link

Compilation Errors with Macros and Preprocessor Directives in GLSL Files #18

Closed dd123-a closed 4 days ago

dd123-a commented 5 days ago

Description: We are encountering multiple compilation errors across several GLSL shader files within the gvox_engine project. The errors are primarily related to macros and preprocessor directives.

Error Messages: Macro Expansion Error: plaintext 深色版本 ERROR: D:/gvox_engine/src/voxels/particles/grass/grass.inl:16: 'macro expansion' : Too many args in macro DAXA_DECL_TASK_HEAD_BEGIN Preprocessor Directive Error: plaintext 深色版本 ERROR: D:/gvox_engine/src/voxels/particles/voxel_particles.inl:11: '#' : preprocessor directive cannot be preceded by another token ERROR: D:/gvox_engine/src/voxels/particles/voxel_particles.inl:11: '' : compilation terminated These errors appear consistently across various shader files including startup.comp.glsl, voxel_world.comp.glsl, perframe.comp.glsl, sim.comp.glsl, sky.comp.glsl, convolve_cube.comp.glsl, and cube.raster.glsl.

Steps to Reproduce: Compile the GLSL shader files using GLSLANG. Observe the error messages during the compilation process. Expected Behavior: The GLSL shader files should compile without errors.

Actual Behavior: Compilation fails with multiple errors related to macros and preprocessor directives.

Environment Details: Compiler: GLSLANG Additional Context: The macro DAXA_DECL_TASK_HEAD_BEGIN appears to be receiving too many arguments in its invocation. Preprocessor directives seem to be incorrectly formatted or placed within the shader files. Files Affected: grass.inl voxel_particles.inl sim_particle.inl tree_particle.inl fire_particle.inl flower.inl sky.inl

GabeRundlett commented 5 days ago

Hey @dd123-a. Sorry for the late reply. The issue here I'm assuming is due to the git submodule for Daxa being at the incorrect hash now that you switched branches. please run git submodule update, and reconfigure CMake

dd123-a commented 4 days ago

Problem solved! Love you, my Voxel King.