move compiled shaders out of repo and put every shader in separate file

This commit is contained in:
ohyzha
2024-07-10 10:25:34 +03:00
parent 29bad103e6
commit 422e2e4261
5 changed files with 24 additions and 1307 deletions

View File

@@ -1,19 +0,0 @@
#!/bin/bash
rm Shaders.h
rm Shaders.c
rm *.spv
for f in ./* ; do
if [[ "$f" != *.sh ]] && [[ "$f" != *.hpp ]] && [[ "$f" != *.cpp ]]
then
glslang -V $f -o $f.spv
fi
done
bin2c -t -d Shaders.h -o Shaders.c *.spv
sed -i 's/char \*entryName/const char *entryName/' Shaders.h
sed -i 's/const char \*data/const unsigned char *data/' Shaders.h
rm *.spv

File diff suppressed because it is too large Load Diff

View File

@@ -1,43 +0,0 @@
/* Generated by bin2c, do not edit manually */
#ifndef __Shaders_h_included
#define __Shaders_h_included
/* Contents of file background.frag.spv */
extern const long int background_frag_spv_size;
extern const unsigned char background_frag_spv[1076];
/* Contents of file background.vert.spv */
extern const long int background_vert_spv_size;
extern const unsigned char background_vert_spv[4180];
/* Contents of file basic.frag.spv */
extern const long int basic_frag_spv_size;
extern const unsigned char basic_frag_spv[376];
/* Contents of file basicTexture.frag.spv */
extern const long int basicTexture_frag_spv_size;
extern const unsigned char basicTexture_frag_spv[668];
/* Contents of file basic.vert.spv */
extern const long int basic_vert_spv_size;
extern const unsigned char basic_vert_spv[2972];
/* Contents of file grid.frag.spv */
extern const long int grid_frag_spv_size;
extern const unsigned char grid_frag_spv[6472];
/* Contents of file grid.vert.spv */
extern const long int grid_vert_spv_size;
extern const unsigned char grid_vert_spv[3340];
/* File table comprising original file name, address and size */
typedef struct {
const char *entryName;
const unsigned char *data;
long int size;
} TFileTableEntry;
extern const unsigned int fileTableSize;
extern const TFileTableEntry fileTable[];
#endif /* __Shaders_h_included */