Skip to content

Commit

Permalink
Fix intel glsl error by #line directive
Browse files Browse the repository at this point in the history
  • Loading branch information
bluekyu committed Apr 3, 2018
1 parent 6de1a12 commit 700b050
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rpplugins/env_probes/shader/generate_mip_shaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@
handle.write('#version 430\n')
handle.write('#define SHADER_NUM_SAMPLES {}\n'.format(num_samples))
handle.write('#pragma include "../filter_cubemap.frag.glsl"\n')

# Panda3D adds "#line" directive after processing "#pragma include", but there is no code after the line.
# However, Intel GLSL compiler occurs "no newline at end of directive #line" error.
# This suppresses the error. (comments does not work)
handle.write('#if 0\n')
handle.write('#endif\n')
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/0.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 128
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/1.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 268
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/10.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 376
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/11.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 388
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/2.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 280
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/3.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 292
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/4.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 304
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/5.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 316
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/6.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 328
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/7.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 340
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/8.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 352
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif
2 changes: 2 additions & 0 deletions src/rpplugins/env_probes/shader/mips/9.autogen.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#version 430
#define SHADER_NUM_SAMPLES 364
#pragma include "../filter_cubemap.frag.glsl"
#if 0
#endif

0 comments on commit 700b050

Please sign in to comment.