Skip to content
0.2.0-dev Download ZIP
47 lines ·2.0 KB Raw
1#include "drivers/gles3/shader_gles3.h"
2
3class VertexFragmentShaderGLES3 : public ShaderGLES3 {
4public:
5 enum ShaderVariant {
6 MODE_NINEPATCH,
7 };
8
9 enum Specializations : uint64_t {
10 DISABLE_LIGHTING = 1,
11 };
12
13 _FORCE_INLINE_ bool version_bind_shader(RID p_version, ShaderVariant p_variant, uint64_t p_specialization = 0) {
14 return _version_bind_shader(p_version, p_variant, p_specialization);
15 }
16
17protected:
18 virtual void _init() override {
19 static const char **_uniform_strings = nullptr;
20 static const char *_variant_defines[] = {
21 "#define USE_NINEPATCH",
22 };
23 static TexUnitPair *_texunit_pairs = nullptr;
24 static UBOPair *_ubo_pairs = nullptr;
25 static Specialization _spec_pairs[] = {
26 { "DISABLE_LIGHTING", false },
27 };
28 static const Feedback *_feedbacks = nullptr;
29 static const uint8_t _code_compressed[] = {
30 120, 218, 149, 143, 205, 14, 130, 48, 16, 132, 189, 186, 79, 177, 199, 130, 200, 79, 244, 70, 124, 22, 210,
31 212, 2, 77, 42, 219, 148, 138, 168, 241, 221, 93, 252, 137, 134, 147, 94, 246, 48, 59, 243, 101, 6, 156,
32 215, 202, 244, 134, 58, 108, 77, 211, 58, 172, 45, 201, 80, 194, 92, 54, 29, 139, 89, 140, 202, 202, 174,
33 89, 215, 228, 15, 50, 32, 127, 227, 12, 172, 60, 211, 49, 8, 75, 74, 134, 41, 176, 195, 60, 98, 255, 43,
34 56, 104, 181, 225, 227, 131, 30, 75, 0, 54, 126, 244, 45, 58, 234, 205, 148, 169, 24, 175, 189, 99, 195,
35 64, 102, 143, 7, 105, 58, 17, 225, 21, 150, 51, 3, 179, 167, 156, 120, 242, 210, 49, 193, 34, 193, 156,
36 111, 84, 194, 13, 96, 1, 255, 172, 129, 239, 142, 63, 116, 249, 34, 226, 94, 187, 208, 114, 27, 33, 102,
37 177, 244, 130, 217, 28, 149, 158, 34, 92, 97, 145, 230, 220, 114, 89, 123, 217, 84, 138, 44, 249, 247, 152,
38 7, 235, 49, 96, 113, 7, 44, 120, 132, 251
39 };
40 const CharString _code = _decompress_code(_code_compressed, 195, 398);
41
42 _setup(_code.get_data(), _code.get_data() + 206, "VertexFragmentShaderGLES3",
43 0, _uniform_strings, 0, _ubo_pairs,
44 0, _feedbacks, 0, _texunit_pairs,
45 1, _spec_pairs, 1, _variant_defines);
46 }
47};