Check if shader compilation fails #16

Closed
opened 2024-12-22 21:46:18 +00:00 by ChaoticByte · 2 comments
ChaoticByte commented 2024-12-22 21:46:18 +00:00 (Migrated from github.com)

For now it can only be binary failed/succeeded

For now it can only be binary failed/succeeded
ChaoticByte commented 2024-12-29 18:09:35 +00:00 (Migrated from github.com)

Trying workaround https://forum.godotengine.org/t/how-to-detect-shader-compilation-errors-at-runtime/66687 by injecting a random uniform bool <name>; and - to prevent the uniform to get optimized away - <name>; in the fragment shader code.
If the uniform isn't found in Filesystem.shader.get_shader_uniform_list(), the shader most probably wasn't compiled correctly.

Trying workaround https://forum.godotengine.org/t/how-to-detect-shader-compilation-errors-at-runtime/66687 by injecting a random `uniform bool <name>;` and - to prevent the uniform to get optimized away - `<name>;` in the fragment shader code. If the uniform isn't found in `Filesystem.shader.get_shader_uniform_list()`, the shader most probably wasn't compiled correctly.
ChaoticByte commented 2024-12-29 18:44:37 +00:00 (Migrated from github.com)

-> This naive approach works, but without a detailed error message

-> This naive approach works, but without a detailed error message
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ChaoticByte/Fragmented#16
No description provided.