mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Fix pbr shader compiliation error, #version
has to be in the first line (#1884)
I've had problems with compiling and running the pbr example: ``` thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Compilation("glslang_shader_preprocess:\nInfo log:\nERROR: 0:40: \'#version\' : must occur first in shader \nERROR: 0:40: \'#version\' : bad profile name; use es, core, or compatibility \nERROR: 0:40: \'#version\' : bad tokens following profile -- expected newline \nERROR: 3 compilation errors. No code generated.\n\n\nDebug log:\n\n")', crates/bevy_render/src/pipeline/pipeline_compiler.rs:161:22 ``` I've checked each shader, and only one shader hasn't had `#version` in the first line. This change fixed my issue.
This commit is contained in:
parent
57e3d4f1c2
commit
ad546a9502
1 changed files with 2 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
#version 450
|
||||
|
||||
// From the Filament design doc
|
||||
// https://google.github.io/filament/Filament.html#table_symbols
|
||||
// Symbol Definition
|
||||
|
@ -32,8 +34,6 @@
|
|||
//
|
||||
// The above integration needs to be approximated.
|
||||
|
||||
#version 450
|
||||
|
||||
const int MAX_LIGHTS = 10;
|
||||
|
||||
struct PointLight {
|
||||
|
|
Loading…
Reference in a new issue