feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
64
engine/tests/python_build/fixtures/gles3/vertex_fragment.out
Normal file
64
engine/tests/python_build/fixtures/gles3/vertex_fragment.out
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
#include "drivers/gles3/shader_gles3.h"
|
||||
|
||||
class VertexFragmentShaderGLES3 : public ShaderGLES3 {
|
||||
public:
|
||||
enum ShaderVariant {
|
||||
MODE_NINEPATCH,
|
||||
};
|
||||
|
||||
enum Specializations {
|
||||
DISABLE_LIGHTING = 1,
|
||||
};
|
||||
|
||||
_FORCE_INLINE_ bool version_bind_shader(RID p_version, ShaderVariant p_variant, uint64_t p_specialization = 0) {
|
||||
return _version_bind_shader(p_version, p_variant, p_specialization);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void _init() override {
|
||||
static const char **_uniform_strings = nullptr;
|
||||
static const char *_variant_defines[] = {
|
||||
"#define USE_NINEPATCH",
|
||||
};
|
||||
static TexUnitPair *_texunit_pairs = nullptr;
|
||||
static UBOPair *_ubo_pairs = nullptr;
|
||||
static Specialization _spec_pairs[] = {
|
||||
{ "DISABLE_LIGHTING", false },
|
||||
};
|
||||
static const Feedback *_feedbacks = nullptr;
|
||||
static const char _vertex_code[] = {
|
||||
R"<!>(
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
|
||||
layout(location = 0) in highp vec3 vertex;
|
||||
|
||||
out highp vec4 position_interp;
|
||||
|
||||
void main() {
|
||||
position_interp = vec4(vertex.x,1,0,1);
|
||||
}
|
||||
|
||||
)<!>"
|
||||
};
|
||||
|
||||
static const char _fragment_code[] = {
|
||||
R"<!>(
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
|
||||
in highp vec4 position_interp;
|
||||
|
||||
void main() {
|
||||
highp float depth = ((position_interp.z / position_interp.w) + 1.0);
|
||||
frag_color = vec4(depth);
|
||||
}
|
||||
)<!>"
|
||||
};
|
||||
|
||||
_setup(_vertex_code, _fragment_code, "VertexFragmentShaderGLES3",
|
||||
0, _uniform_strings, 0, _ubo_pairs,
|
||||
0, _feedbacks, 0, _texunit_pairs,
|
||||
1, _spec_pairs, 1, _variant_defines);
|
||||
}
|
||||
};
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
/* WARNING, THIS FILE WAS GENERATED, DO NOT EDIT */
|
||||
#ifndef VERTEX_FRAGMENT_GLSL_GEN_HGLES3_GLES3
|
||||
#define VERTEX_FRAGMENT_GLSL_GEN_HGLES3_GLES3
|
||||
|
||||
|
||||
#include "drivers/gles3/shader_gles3.h"
|
||||
|
||||
|
||||
class VertexFragmentShaderGLES3 : public ShaderGLES3 {
|
||||
|
||||
public:
|
||||
|
||||
enum ShaderVariant {
|
||||
MODE_NINEPATCH,
|
||||
};
|
||||
|
||||
enum Specializations {
|
||||
DISABLE_LIGHTING=1,
|
||||
};
|
||||
|
||||
_FORCE_INLINE_ bool version_bind_shader(RID p_version,ShaderVariant p_variant,uint64_t p_specialization=0) { return _version_bind_shader(p_version,p_variant,p_specialization); }
|
||||
|
||||
protected:
|
||||
|
||||
virtual void _init() override {
|
||||
|
||||
static const char **_uniform_strings=nullptr;
|
||||
static const char* _variant_defines[]={
|
||||
"#define USE_NINEPATCH",
|
||||
};
|
||||
|
||||
static TexUnitPair *_texunit_pairs=nullptr;
|
||||
static UBOPair *_ubo_pairs=nullptr;
|
||||
static Specialization _spec_pairs[]={
|
||||
{"DISABLE_LIGHTING",false},
|
||||
};
|
||||
|
||||
static const Feedback* _feedbacks=nullptr;
|
||||
static const char _vertex_code[]={
|
||||
R"<!>(
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
|
||||
layout(location = 0) in highp vec3 vertex;
|
||||
|
||||
out highp vec4 position_interp;
|
||||
|
||||
void main() {
|
||||
position_interp = vec4(vertex.x,1,0,1);
|
||||
}
|
||||
|
||||
)<!>"
|
||||
};
|
||||
|
||||
static const char _fragment_code[]={
|
||||
R"<!>(
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
|
||||
in highp vec4 position_interp;
|
||||
|
||||
void main() {
|
||||
highp float depth = ((position_interp.z / position_interp.w) + 1.0);
|
||||
frag_color = vec4(depth);
|
||||
}
|
||||
)<!>"
|
||||
};
|
||||
|
||||
_setup(_vertex_code,_fragment_code,"VertexFragmentShaderGLES3",0,_uniform_strings,0,_ubo_pairs,0,_feedbacks,0,_texunit_pairs,1,_spec_pairs,1,_variant_defines);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
"vertex_lines": [
|
||||
"",
|
||||
"precision highp float;",
|
||||
"precision highp int;",
|
||||
"",
|
||||
"layout(location = 0) in highp vec3 vertex;",
|
||||
"",
|
||||
"out highp vec4 position_interp;",
|
||||
"",
|
||||
"void main() {",
|
||||
"\tposition_interp = vec4(vertex.x,1,0,1);",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"fragment_lines": [
|
||||
"",
|
||||
"precision highp float;",
|
||||
"precision highp int;",
|
||||
"",
|
||||
"in highp vec4 position_interp;",
|
||||
"",
|
||||
"void main() {",
|
||||
"\thighp float depth = ((position_interp.z / position_interp.w) + 1.0);",
|
||||
"\tfrag_color = vec4(depth);",
|
||||
"}"
|
||||
],
|
||||
"uniforms": [],
|
||||
"fbos": [],
|
||||
"texunits": [],
|
||||
"texunit_names": [],
|
||||
"ubos": [],
|
||||
"ubo_names": [],
|
||||
"feedbacks": [],
|
||||
"vertex_included_files": [],
|
||||
"fragment_included_files": [],
|
||||
"reading": "fragment",
|
||||
"line_offset": 33,
|
||||
"vertex_offset": 10,
|
||||
"fragment_offset": 23,
|
||||
"variant_defines": [
|
||||
"#define USE_NINEPATCH"
|
||||
],
|
||||
"variant_names": [
|
||||
"MODE_NINEPATCH"
|
||||
],
|
||||
"specialization_names": [
|
||||
"DISABLE_LIGHTING"
|
||||
],
|
||||
"specialization_values": [
|
||||
" false\n"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
/* WARNING, THIS FILE WAS GENERATED, DO NOT EDIT */
|
||||
#ifndef COMPUTE_SHADER_GLSL_RAW_H
|
||||
#define COMPUTE_SHADER_GLSL_RAW_H
|
||||
|
||||
static const char compute_shader_glsl[] = {
|
||||
R"<!>(#[compute]
|
||||
|
||||
|
|
@ -17,4 +13,3 @@ void main() {
|
|||
}
|
||||
)<!>"
|
||||
};
|
||||
#endif
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"code": "#[compute]\n\n#version 450\n\n#VERSION_DEFINES\n\n\n#define M_PI 3.14159265359\n\nvoid main() {\n\tvec3 static_light = vec3(0, 1, 0);\n}\n"
|
||||
}
|
||||
|
|
@ -1,7 +1,3 @@
|
|||
/* WARNING, THIS FILE WAS GENERATED, DO NOT EDIT */
|
||||
#ifndef VERTEX_FRAGMENT_SHADER_GLSL_RAW_H
|
||||
#define VERTEX_FRAGMENT_SHADER_GLSL_RAW_H
|
||||
|
||||
static const char vertex_fragment_shader_glsl[] = {
|
||||
R"<!>(#[versions]
|
||||
|
||||
|
|
@ -37,4 +33,3 @@ void main() {
|
|||
}
|
||||
)<!>"
|
||||
};
|
||||
#endif
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"code": "#[versions]\n\nlines = \"#define MODE_LINES\";\n\n#[vertex]\n\n#version 450\n\n#VERSION_DEFINES\n\nlayout(location = 0) out vec3 uv_interp;\n\nvoid main() {\n\n#ifdef MODE_LINES\n\tuv_interp = vec3(0,0,1);\n#endif\n}\n\n#[fragment]\n\n#version 450\n\n#VERSION_DEFINES\n\n#define M_PI 3.14159265359\n\nlayout(location = 0) out vec4 dst_color;\n\nvoid main() {\n\tdst_color = vec4(1,1,0,0);\n}\n"
|
||||
}
|
||||
|
|
@ -1,15 +1,10 @@
|
|||
/* WARNING, THIS FILE WAS GENERATED, DO NOT EDIT */
|
||||
#ifndef COMPUTE_GLSL_GEN_H_RD
|
||||
#define COMPUTE_GLSL_GEN_H_RD
|
||||
|
||||
#include "servers/rendering/renderer_rd/shader_rd.h"
|
||||
|
||||
class ComputeShaderRD : public ShaderRD {
|
||||
|
||||
public:
|
||||
|
||||
ComputeShaderRD() {
|
||||
|
||||
static const char *_vertex_code = nullptr;
|
||||
static const char *_fragment_code = nullptr;
|
||||
static const char _compute_code[] = {
|
||||
R"<!>(
|
||||
#version 450
|
||||
|
|
@ -25,8 +20,6 @@ void main() {
|
|||
}
|
||||
)<!>"
|
||||
};
|
||||
setup(nullptr, nullptr, _compute_code, "ComputeShaderRD");
|
||||
setup(_vertex_code, _fragment_code, _compute_code, "ComputeShaderRD");
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"vertex_lines": [],
|
||||
"fragment_lines": [],
|
||||
"compute_lines": [
|
||||
"",
|
||||
"#version 450",
|
||||
"",
|
||||
"#VERSION_DEFINES",
|
||||
"",
|
||||
"#define BLOCK_SIZE 8",
|
||||
"",
|
||||
"#define M_PI 3.14159265359",
|
||||
"",
|
||||
"void main() {",
|
||||
"\tuint t = BLOCK_SIZE + 1;",
|
||||
"}"
|
||||
],
|
||||
"vertex_included_files": [],
|
||||
"fragment_included_files": [],
|
||||
"compute_included_files": [
|
||||
"tests/python_build/fixtures/rd_glsl/_included.glsl"
|
||||
],
|
||||
"reading": "compute",
|
||||
"line_offset": 13,
|
||||
"vertex_offset": 0,
|
||||
"fragment_offset": 0,
|
||||
"compute_offset": 1
|
||||
}
|
||||
|
|
@ -1,15 +1,8 @@
|
|||
/* WARNING, THIS FILE WAS GENERATED, DO NOT EDIT */
|
||||
#ifndef VERTEX_FRAGMENT_GLSL_GEN_H_RD
|
||||
#define VERTEX_FRAGMENT_GLSL_GEN_H_RD
|
||||
|
||||
#include "servers/rendering/renderer_rd/shader_rd.h"
|
||||
|
||||
class VertexFragmentShaderRD : public ShaderRD {
|
||||
|
||||
public:
|
||||
|
||||
VertexFragmentShaderRD() {
|
||||
|
||||
static const char _vertex_code[] = {
|
||||
R"<!>(
|
||||
#version 450
|
||||
|
|
@ -39,8 +32,7 @@ void main() {
|
|||
}
|
||||
)<!>"
|
||||
};
|
||||
setup(_vertex_code, _fragment_code, nullptr, "VertexFragmentShaderRD");
|
||||
static const char *_compute_code = nullptr;
|
||||
setup(_vertex_code, _fragment_code, _compute_code, "VertexFragmentShaderRD");
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
"vertex_lines": [
|
||||
"",
|
||||
"#version 450",
|
||||
"",
|
||||
"#VERSION_DEFINES",
|
||||
"",
|
||||
"#define M_PI 3.14159265359",
|
||||
"",
|
||||
"layout(location = 0) out vec2 uv_interp;",
|
||||
"",
|
||||
"void main() {",
|
||||
"\tuv_interp = vec2(0, 1);",
|
||||
"}",
|
||||
""
|
||||
],
|
||||
"fragment_lines": [
|
||||
"",
|
||||
"#version 450",
|
||||
"",
|
||||
"#VERSION_DEFINES",
|
||||
"",
|
||||
"layout(location = 0) in vec2 uv_interp;",
|
||||
"",
|
||||
"void main() {",
|
||||
"\tuv_interp = vec2(1, 0);",
|
||||
"}"
|
||||
],
|
||||
"compute_lines": [],
|
||||
"vertex_included_files": [
|
||||
"tests/python_build/fixtures/rd_glsl/_included.glsl"
|
||||
],
|
||||
"fragment_included_files": [],
|
||||
"compute_included_files": [],
|
||||
"reading": "fragment",
|
||||
"line_offset": 25,
|
||||
"vertex_offset": 1,
|
||||
"fragment_offset": 15,
|
||||
"compute_offset": 0
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue